Ruvio.Client.AspNetCore
0.2.10
See the version list below for details.
dotnet add package Ruvio.Client.AspNetCore --version 0.2.10
NuGet\Install-Package Ruvio.Client.AspNetCore -Version 0.2.10
<PackageReference Include="Ruvio.Client.AspNetCore" Version="0.2.10" />
<PackageVersion Include="Ruvio.Client.AspNetCore" Version="0.2.10" />
<PackageReference Include="Ruvio.Client.AspNetCore" />
paket add Ruvio.Client.AspNetCore --version 0.2.10
#r "nuget: Ruvio.Client.AspNetCore, 0.2.10"
#:package Ruvio.Client.AspNetCore@0.2.10
#addin nuget:?package=Ruvio.Client.AspNetCore&version=0.2.10
#tool nuget:?package=Ruvio.Client.AspNetCore&version=0.2.10
Ruvio.Client.AspNetCore
Registers Ruvio.Client in an ASP.NET Core service collection. The client speaks RESP2 and does not send CLIENT SETINFO. The TCP connection opens when dependency injection creates RuvioClient, which is a singleton.
builder.Services.AddRuvioClient("127.0.0.1", 6379, database: 2);
With options:
builder.Services.AddRuvioClient(options =>
{
options.Host = "127.0.0.1";
options.Port = 6379;
options.Database = 2;
options.Reconnect = true;
options.MaxReconnectAttempts = 8;
options.ReconnectBaseDelay = TimeSpan.FromMilliseconds(100);
options.ReconnectMaxDelay = TimeSpan.FromSeconds(2);
}, client =>
{
client.ConnectionLost += (_, notice) =>
Console.WriteLine($"lost {notice.Host}:{notice.Port} subscriber={notice.Subscriber}");
client.ConnectionRestored += (_, notice) =>
Console.WriteLine($"restored {notice.Host}:{notice.Port}");
});
Configuration section:
builder.Services.AddRuvioClient(builder.Configuration.GetSection("Ruvio"));
{
"Ruvio": {
"Host": "127.0.0.1",
"Port": 6379,
"Database": 2,
"Reconnect": true,
"MaxReconnectAttempts": 8,
"ReconnectBaseDelay": "00:00:00.100",
"ReconnectMaxDelay": "00:00:02"
}
}
Reconnect defaults to true. A broken command or shard socket is opened again before the next command. The command that discovers the drop fails, so a write is not sent twice. A single GET, MGET, EXISTS, HGET, TTL, or PTTL is sent once more when no reply byte arrived. A pipeline is not retried. Pub/Sub channels are subscribed again on the new socket. Set Reconnect to false and call ReconnectAsync when the application should own the timing. ReconnectDelay is a Func<int, TimeSpan?> and is not read from configuration; return null to stop. When it is set, MaxReconnectAttempts is not applied. The configureClient callback runs once, after the socket opens, so ConnectionLost, ConnectionRestored, and ConnectionFailed are attached before the singleton is handed out. RuvioConnectionNotice carries host, port, whether the socket is the Pub/Sub connection, and the error on a drop.
Connect sends CLUSTER SLOTS and, on a sharded server, routes by hash slot. Database 0 sends nothing after that; any other index sends SELECT on a standalone server. Cluster mode has only database 0. The registered client stays on that database unless code calls SelectAsync, which changes it for every consumer of the singleton.
The same singleton is RuvioClient, IRuvioClient, and IRuvioConnection. Inject IRuvioClient into services that send commands. Inject IRuvioConnection where code reconnects or handles ConnectionLost and ConnectionRestored. Resolve RuvioClient once at startup if the process should fail before it accepts traffic:
app.Services.GetRequiredService<RuvioClient>();
Optional health check
builder.Services.AddHealthChecks().AddRuvio(tags: ["ready"]);
app.MapHealthChecks("/health/ready");
The check sends a bounded PING through the existing IRuvioClient. It creates no
polling loop and runs only when the health-check service is invoked. The default
timeout is five seconds. It checks command-connection reachability, not every
shard, replica freshness, persistence health, or write availability. Prefer a
readiness endpoint rather than restarting the application when its dependency is
unavailable.
The separately packaged .NET integrations
provide IDistributedCache, ASP.NET Core output caching, Data Protection key-ring
storage, opt-in distributed rate limiting and HTTP idempotency.
Register this client's singleton once; integration packages neither own nor dispose it.
Data Protection can select a separate durable, non-evicting connection through
its client-factory overload instead of sharing an eviction-prone cache deployment.
| Product | Versions 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 was computed. 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. |
-
net8.0
- Ruvio.Client (>= 0.2.10)
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.3.1 | 0 | 10/10/2026 |
| 0.3.0 | 0 | 10/9/2026 |
| 0.2.13 | 91 | 10/5/2026 |
| 0.2.12 | 83 | 10/2/2026 |
| 0.2.11 | 88 | 10/2/2026 |
| 0.2.10 | 86 | 10/2/2026 |
| 0.2.9 | 80 | 10/2/2026 |
| 0.2.8 | 81 | 10/1/2026 |
| 0.2.7 | 84 | 9/30/2026 |
| 0.2.6 | 91 | 9/26/2026 |
| 0.2.5 | 85 | 9/26/2026 |
| 0.2.4 | 87 | 9/26/2026 |
| 0.2.3 | 89 | 9/26/2026 |
| 0.2.2 | 88 | 9/25/2026 |
| 0.2.1 | 94 | 9/25/2026 |
| 0.2.0 | 89 | 9/25/2026 |
| 0.1.0 | 94 | 9/23/2026 |