Monq.Core.GrpcClientExtensions
0.1.0-rev-41121789246
dotnet add package Monq.Core.GrpcClientExtensions --version 0.1.0-rev-41121789246
NuGet\Install-Package Monq.Core.GrpcClientExtensions -Version 0.1.0-rev-41121789246
<PackageReference Include="Monq.Core.GrpcClientExtensions" Version="0.1.0-rev-41121789246" />
<PackageVersion Include="Monq.Core.GrpcClientExtensions" Version="0.1.0-rev-41121789246" />
<PackageReference Include="Monq.Core.GrpcClientExtensions" />
paket add Monq.Core.GrpcClientExtensions --version 0.1.0-rev-41121789246
#r "nuget: Monq.Core.GrpcClientExtensions, 0.1.0-rev-41121789246"
#:package Monq.Core.GrpcClientExtensions@0.1.0-rev-41121789246
#addin nuget:?package=Monq.Core.GrpcClientExtensions&version=0.1.0-rev-41121789246&prerelease
#tool nuget:?package=Monq.Core.GrpcClientExtensions&version=0.1.0-rev-41121789246&prerelease
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 alsoipv4:///,unix:/and custom resolver schemes), so non-http addresses getChannelCredentials.Insecure; - round-robin balancing — enabled exactly for load-balanced addresses (resolution mode
ServiceDiscoveryor thednsscheme); 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
Authorizationheader is forwarded, and when no HTTP context is present a token is obtained throughMonq.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 | 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 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. |
-
net10.0
- Grpc.AspNetCore.Server.ClientFactory (>= 2.83.0)
- Monq.Core.HttpClientExtensions (>= 8.0.0-rev-41050814772)
- Monq.Core.MicroserviceAddressing (>= 0.1.0)
-
net8.0
- Grpc.AspNetCore.Server.ClientFactory (>= 2.83.0)
- Monq.Core.HttpClientExtensions (>= 8.0.0-rev-41050814772)
- Monq.Core.MicroserviceAddressing (>= 0.1.0)
-
net9.0
- Grpc.AspNetCore.Server.ClientFactory (>= 2.83.0)
- Monq.Core.HttpClientExtensions (>= 8.0.0-rev-41050814772)
- Monq.Core.MicroserviceAddressing (>= 0.1.0)
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 |