NResilience.Grpc 0.32.0

dotnet add package NResilience.Grpc --version 0.32.0
                    
NuGet\Install-Package NResilience.Grpc -Version 0.32.0
                    
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="NResilience.Grpc" Version="0.32.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NResilience.Grpc" Version="0.32.0" />
                    
Directory.Packages.props
<PackageReference Include="NResilience.Grpc" />
                    
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 NResilience.Grpc --version 0.32.0
                    
#r "nuget: NResilience.Grpc, 0.32.0"
                    
#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 NResilience.Grpc@0.32.0
                    
#: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=NResilience.Grpc&version=0.32.0
                    
Install as a Cake Addin
#tool nuget:?package=NResilience.Grpc&version=0.32.0
                    
Install as a Cake Tool

NResilience.Grpc

The gRPC integration for NResilience: a client interceptor that runs a resilience policy around each gRPC call.

services.AddGrpcClient<Orders.OrdersClient>(o => o.Address = new Uri("https://orders.internal:5001"))
    .AddGrpcResilience();

That is the whole setup. The client now retries what is worth retrying, stops when the deadline says so, opens a circuit per service, and tells the server how long each attempt has.

Why not AddResilience()

AddGrpcClient<T>() returns an IHttpClientBuilder, so calling the HTTP registration on it compiles - and does nothing useful:

  • Every gRPC call is an HTTP POST, which the HTTP handler refuses to retry by default, so the handler is inert.
  • A gRPC failure travels in the grpc-status trailer on an HTTP 200, so the HTTP classifier reads a successful response. The classification is not merely absent, it is wrong.

AddGrpcResilience() is the gRPC-shaped registration, and the distinct name keeps the two from being confused at a call site.

What it does

Classifies gRPC statuses Unavailable and DeadlineExceeded are transient, ResourceExhausted is throttling, and everything else is an answer. Any of it is one line to override.
Repeats unary calls by default The opposite of the HTTP default, because every gRPC call is a POST at the transport and most are reads at the application. Mark the ones that must not repeat with RepeatableWhen, or wrap a call site in GrpcResilience.SingleShot().
Propagates the attempt deadline Each attempt's ceiling is written into CallOptions.Deadline, which grpc-dotnet sends as the standard grpc-timeout header. The peer learns the bound; nothing new to parse.
Scopes guards per service One breaker, one retry budget, and one latency window per gRPC service by default. ScopeBy makes that per method or one per client.
Retries a server stream to its first message A server-streaming call is retried while it is still indistinguishable from a call (before anything is yielded) and never after. Its wire deadline is the whole call's remaining budget rather than the attempt ceiling.
Reports nested retries Under the same x-nresilience-retrying marker the HTTP handler uses, so the fact crosses transports.

Client-streaming and duplex calls pass through untouched: the request stream is a source the caller drives interactively, and repeating one means re-enumerating something the failed attempt already consumed.

MIT licensed.

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.

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.32.0 85 9/10/2026
0.31.0 92 9/9/2026
0.30.0 98 9/9/2026
0.29.0 97 9/9/2026
0.28.0 89 9/9/2026
0.27.0 96 9/9/2026
0.26.0 90 9/8/2026
0.25.0 101 9/8/2026
0.24.0 94 9/8/2026
0.23.0 103 9/5/2026
0.22.0 98 9/5/2026
0.21.0 102 9/3/2026