Configuration
The KubeMQClientSettings table, configuration sections, connection-string rules, and version requirements for the KubeMQ .NET Aspire client.
This page is the complete configuration surface for the KubeMQ.Aspire.Client package: the configuration sections each registration method binds, the full KubeMQClientSettings table, the connection-string parsing rules, and the supported runtime and dependency versions. For the registration methods themselves see the Client API; for a task-oriented walkthrough see the Client Configuration and TLS guide.
Configuration sections
Client settings are bound from configuration before the configureSettings delegate runs. The configuration section depends on which registration method you call.
| Registration | Configuration section |
|---|---|
AddKubeMQClient("messaging") | Aspire:KubeMQ:Client |
AddKeyedKubeMQClient("orders") | Aspire:KubeMQ:Client:orders |
The top-level Aspire:KubeMQ:Client section configures the default client. Named subsections under it — Aspire:KubeMQ:Client:{name} — configure each keyed client, where {name} matches the service key.
{
"Aspire": {
"KubeMQ": {
"Client": {
"DisableHealthChecks": false,
"DisableTracing": false,
"DisableMetrics": false,
"HealthCheckTimeout": "00:00:05",
"AuthToken": null,
"ClientId": null
}
}
}
}{
"Aspire": {
"KubeMQ": {
"Client": {
"orders": {
"ClientId": "orders-service",
"GrpcChannelCount": 8
},
"notifications": {
"DisableTracing": true
}
}
}
}
}Settings can also be set in code via the configureSettings delegate, which is applied after binding and overrides configured values:
builder.AddKubeMQClient("messaging", settings =>
{
settings.DisableHealthChecks = true;
settings.AuthToken = "my-token";
});KubeMQClientSettings
Every property on KubeMQClientSettings. Properties whose default is "SDK default" are nullable — leaving them null passes through to the underlying KubeMQ.SDK.CSharp default shown in parentheses.
Prop
Type
GrpcChannelCount is constrained to the range 1–16 by the configuration schema. The Tls* properties take effect only when UseTls is true; otherwise they are ignored. For a guided tour of TLS, gRPC tuning, keepalive, and reconnect, see Client Configuration and TLS.
Connection string format
The integration parses the connection string into a host and port before constructing the client. The parser enforces strict rules — violations throw a KubeMQConfigurationException.
| Rule | Detail |
|---|---|
Plain host:port | The standard form, e.g. localhost:50000. |
| No scheme prefix | A string containing :// is rejected — supply host:port, not grpc://host:port. |
| IPv6 requires brackets | An IPv6 address must use [host]:port, e.g. [::1]:50000. An unbracketed IPv6 address is rejected. |
| Port range | The port must parse as an integer between 1 and 65535. |
| Non-empty host | The host component must not be empty after parsing. |
localhost:50000
messaging:50000
[::1]:50000grpc://localhost:50000 # scheme prefix
::1:50000 # IPv6 without brackets
localhost:70000 # port out of rangeIn an Aspire app you normally never write this string by hand — WithReference(messaging) injects it as the connection string and AddKubeMQClient("messaging") resolves it. Setting ConnectionString explicitly in KubeMQClientSettings overrides the injected value and takes precedence.
Requirements
| Requirement | Version |
|---|---|
| .NET SDK | 8.0 or 9.0 |
| .NET Aspire | 9.0+ |
| Docker | Running (for local container provisioning) |
| KubeMQ license key | Set via WithLicenseKey() |
The packages build on these dependency versions:
| Dependency | Version |
|---|---|
Aspire.Hosting | 9.0.0 |
KubeMQ.SDK.CSharp | 3.0.1 |
The KubeMQ .NET Aspire integration is licensed under Apache 2.0.
Related
Was this page helpful?
Client API
AddKubeMQClient and AddKeyedKubeMQClient registration methods, plus the health checks and OpenTelemetry sources the client wires by default.
Hosting API
AddKubeMQ and the WithLicenseKey, WithDataVolume, and WithImageTag builder methods for provisioning a KubeMQ container in the Aspire AppHost.