Felix.Client 0.6.2

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Felix.Client --version 0.6.2
                    
NuGet\Install-Package Felix.Client -Version 0.6.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Felix.Client" Version="0.6.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Felix.Client" Version="0.6.2" />
                    
Directory.Packages.props
<PackageReference Include="Felix.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Felix.Client --version 0.6.2
                    
#r "nuget: Felix.Client, 0.6.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Felix.Client@0.6.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Felix.Client&version=0.6.2
                    
Install as a Cake Addin
#tool nuget:?package=Felix.Client&version=0.6.2
                    
Install as a Cake Tool

Felix.Client

The C# client for Felix. It binds the C ABI in crates/sdk/felix-capi, which wraps the Rust client, so reconnection, redirects and error classes are the Rust client's. Targets net8.0 and net10.0 on Linux, macOS and Windows, each on x64 and arm64; CI tests every one of those natively (the broker scenarios on Linux x64 only). The NuGet package carries the native library for all six, so there is nothing else to install.

dotnet add package Felix.Client

It binds every function in felix.h: connect (with a token provider that renews the token), publish (single, batch, keyed records and named-shard), subscribe to one shard or every shard and resume (SubscribeShardedAsync, ResubscribeShardedAsync), consumer groups (on a shard and across every shard, with the stream-wide admin calls), caches, counters and cache watches (single and sharded, retained, resumable), atomic commits with state reads and conditional publishes (CommitAsync, CommitIfAsync, PublishIfAsync, GetStateAsync), idempotent producers (CreateProducerAsync), endpoints, offset lookup by time, and the publisher and timestamp metadata. python3 scripts/check_csharp_bindings.py fails if an export of felix.h is not bound. See the C# page.

await using var client = await FelixClient.ConnectAsync(new FelixClientOptions
{
    Addrs = ["127.0.0.1:5000"],
    TenantId = "t1",
    Token = "my-token",
});
await using var sub = await client.SubscribeAsync("t1", "default", "events", 0, StartPosition.Latest);
long? offset = await client.PublishAsync("t1", "default", "events", "hello"u8.ToArray());
await foreach (var ev in sub) { Console.WriteLine(ev.Offset); break; }

A process that outlives its token sets TokenProvider (a Func<CancellationToken, ValueTask<string>>); Token is then optional. The library calls it lazily, one call at a time, and the page above covers failure and cancellation.

Build and test

To build the native library yourself, for a platform the package does not carry or to develop the SDK:

cargo build --release -p felix-capi
export FELIX_NATIVE_LIB="$PWD/target/release/libfelix.so"   # .dylib on macOS, felix.dll on Windows
dotnet test sdks/dotnet/Felix.sln

FELIX_NATIVE_LIB wins when set; otherwise the library is found next to Felix.Client.dll, then under runtimes/<rid>/native/, where the package puts it. Scenario tests against a broker are skipped unless FELIX_FIXTURE names the file written by felix-cluster client-fixture --out FILE --ca-file CA.PEM. The version comes from the workspace Cargo.toml; pass -p:Version=... to override it.

Tests tag the conformance scenarios they cover with [Scenario("id")]. Set FELIX_CONFORMANCE_RESULTS=FILE to write the results document, then check it with cargo run -p felix-conformance -- verify FILE.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.0-preview.2 50 11/2/2026
0.7.0-preview.1 62 10/30/2026
0.6.2 110 10/25/2026