MassTransit
Run MassTransit .NET apps over KubeMQ — a drop-in transport mapping Send, Publish, and request/response to native Queues, Events, EventsStore, and CQ.
MassTransit is the open-source distributed-application framework for .NET. MassTransit.KubeMQ is a MassTransit transport that runs the bus over KubeMQ via gRPC: you register it the same way you would RabbitMQ or Azure Service Bus, and your existing consumers, sagas, and message contracts work unchanged on KubeMQ.
Because the transport plugs in below the MassTransit abstractions, adopting KubeMQ is a configuration change rather than a rewrite. Message contracts, IConsumer<T> implementations, sagas, the middleware pipeline, serialization, retry/redelivery policies, the EF Core outbox, OpenTelemetry, and DI registration (AddConsumer<T>, AddSaga<T>) all behave identically — only where messages physically travel changes.
New to the idea? See what is an integration for how SDK-level integrations differ from the server-side connectors.
Why MassTransit + KubeMQ
- Drop-in transport swap — change
UsingRabbitMq,UsingAzureServiceBus, orUsingAmazonSqstoUsingKubeMQ; contracts and consumers stay the same. - Native request/response — KubeMQ's CQ pattern provides built-in request-reply with no temporary reply queues (unlike RabbitMQ/SQS, which simulate it).
- Fire-and-forget or durable-replayable publish —
Publish<T>()maps to KubeMQ Events for fan-out, or to EventsStore for persistent, replayable pub/sub. - Built-in priority queues and consumer groups — weighted priority channels and competing consumers without extra infrastructure.
- Full observability — W3C trace context is propagated via tags, and the bus integrates with ASP.NET Core health checks and a
MassTransit.KubeMQmetrics meter.
Install
dotnet add package MassTransit.KubeMQThe transport targets net8.0 and requires MassTransit >= 8.5.0.
Supported versions
| Requirement | Supported versions |
|---|---|
| Language | C# / .NET (net8.0 target) |
| Runtime | .NET SDK 8.0+ |
| MassTransit | >= 8.5.0 |
| KubeMQ broker | Reachable over native gRPC on port 50000 |
| Package | MassTransit.KubeMQ 1.0.0 |
The transport is a native gRPC client that connects to KubeMQ on port 50000. It is not an HTTP connector, so there is no CONNECTORS*_ENABLE flag to set — exposing the gRPC port is all that is needed. KubeMQ channels are created automatically on first use; there is no exchange, binding, virtual host, or topic-subscription topology to provision.
Architecture
Your application talks to MassTransit abstractions as usual. The transport layers KubeMQ onto an InMemory base bus (for the IBusControl lifecycle) plus a KubeMQ rider that owns the connections and receive transports. The rider bridges those abstractions to the broker over gRPC on port 50000, where KubeMQ dispatches to its four native subsystems.
The KubeMQ rider maps MassTransit's transport-agnostic operations onto native KubeMQ Queues, Events, EventsStore, and CQ over gRPC.
Pattern mapping
MassTransit's transport-agnostic verbs map to KubeMQ's native messaging patterns. The mapping determines delivery semantics and which KubeMQ subsystem backs each message.
| MassTransit verb | KubeMQ pattern | Delivery | Capability page |
|---|---|---|---|
| Send | Queues | Point-to-point (exactly one consumer) | Queues |
| Publish | Events | Fan-out (all active subscribers, fire-and-forget) | Events |
| Publish (durable) | EventsStore | Fan-out with persistence and replay | Events Store |
| Request/Response | Commands/Queries (CQ) | Native request-reply | Commands & Queries |
Capabilities
Events (Publish)
Fire-and-forget fan-out backed by KubeMQ Events, with consumer groups and volatile-delivery semantics.
Queues (Send)
Durable point-to-point delivery: delayed send, TTL, batch consumers, priority queues, and competing consumers.
Commands & Queries (Request/Response)
Native request-reply over KubeMQ CQ — no temporary reply queues — with CqMode selection and timeouts.
Events Store (Durable Publish)
Persistent, replayable fan-out where late subscribers catch up from a configurable start position.
Next steps
Getting started
Send and receive your first message over the KubeMQ transport in minutes.
Concepts
How the rider, channel naming, header mapping, CQ modes, and the connection lifecycle work.
Guides
Configuration, error handling and DLQ, observability, and migrating from another transport.
Reference
Transport options, configurator API, EventsStore positions, channel naming, and error codes.
New to KubeMQ? Start with the KubeMQ Getting Started guide for the core messaging concepts.
Was this page helpful?
Configuration Reference
Every kubemq.* property for the Spring Boot starter — connection, TLS, listeners, template, health, metrics, and Kotlin — with types and defaults.
MassTransit Concepts
Understand how MassTransit messaging patterns map onto native KubeMQ patterns, channel naming, header mapping, and the rider-based transport architecture.