Monq.Core.GrpcClientExtensions 0.1.0-rev-41121789246

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

Monq.Core.GrpcClientExtensions

Monq.Core.GrpcClientExtensions registers gRPC clients that resolve their addresses through Monq.Core.MicroserviceAddressing. It is the gRPC counterpart of Monq.Core.HttpClientExtensions for the HTTP side and centralizes the transport rules that every MONQ service otherwise had to duplicate:

  • scheme-aware channel credentials — grpc-dotnet requires explicit credentials for any address scheme other than http/https (dns:/// from Service Discovery, but also ipv4:///, unix:/ and custom resolver schemes), so non-http addresses get ChannelCredentials.Insecure;
  • round-robin balancing — enabled exactly for load-balanced addresses (resolution mode ServiceDiscovery or the dns scheme); Direct (ClusterIP) addresses keep kube-proxy balancing;
  • client-side service discovery — a DNS resolver with a configurable refresh interval shared by all clients;
  • static authorization fallback for background/console clients — the incoming Authorization header is forwarded, and when no HTTP context is present a token is obtained through Monq.Core.HttpClientExtensions.RestHttpClient.

Quick start

builder.Services.AddMicroserviceAddressing();
builder.Host.UseGrpcMicroserviceAddressResolver(new KubernetesServiceDiscoveryAddressResolver());

// Address resolved by application name on the first client creation.
builder.Services.AddMonqGrpcClient<SampleService.SampleServiceClient>("sample-api-service");

// Named registration for several clients of the same type.
builder.Services.AddMonqGrpcClient<SampleService.SampleServiceClient>(
    name: "secondary",
    applicationName: "sample-api-service",
    port: 5006,
    addressResolver: new FixedMicroserviceAddressResolver(new Uri("http://localhost:5006")));

// Settings resolved lazily — for composed libraries.
builder.Services.AddMonqGrpcClient<SampleService.SampleServiceClient>(
    "sample",
    provider => new GrpcClientAddressSettings("sample-api-service", 5006));

// Fixed address for local debugging.
builder.Services.AddMonqGrpcClient<SampleService.SampleServiceClient>(
    new Uri("http://localhost:5006"));

// Additional client/channel configuration via a lambda.
builder.Services.AddMonqGrpcClient<SampleService.SampleServiceClient>(
    "sample-api-service",
    configureOptions: options => options.ChannelOptionsAction =
        channelOptions => channelOptions.MaxReceiveMessageSize = null);

Background and console clients use the console variants and receive call credentials with static token fallback:

builder.Services.AddMonqGrpcConsoleClient<SampleService.SampleServiceClient>(
    "sample-api-service");

Service discovery options

builder.Services.ConfigureMonqGrpcServiceDiscovery(options =>
    options.DnsRefreshInterval = TimeSpan.FromSeconds(15));

Behavior summary

Address Credentials Load balancing
http/https (Direct, ClusterIP) inferred from scheme kube-proxy (no service config)
dns:/// (Service Discovery, headless Service) Insecure round-robin over resolved pods
ipv4:///, unix:/, custom schemes Insecure per resolver semantics
Fixed URI (Uri overloads) scheme-aware round-robin only for the dns scheme

Roadmap

MONQ service frameworks move their gRPC registration internals onto this package without changing their public APIs; composed server libraries are expected to use it directly.

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 is compatible.  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.1.0-rev-41121789246 26 10/30/2026
0.1.0-rev-41116107820 34 10/30/2026