ModulusKit.Messaging.RabbitMq
4.0.0
dotnet add package ModulusKit.Messaging.RabbitMq --version 4.0.0
NuGet\Install-Package ModulusKit.Messaging.RabbitMq -Version 4.0.0
<PackageReference Include="ModulusKit.Messaging.RabbitMq" Version="4.0.0" />
<PackageVersion Include="ModulusKit.Messaging.RabbitMq" Version="4.0.0" />
<PackageReference Include="ModulusKit.Messaging.RabbitMq" />
paket add ModulusKit.Messaging.RabbitMq --version 4.0.0
#r "nuget: ModulusKit.Messaging.RabbitMq, 4.0.0"
#:package ModulusKit.Messaging.RabbitMq@4.0.0
#addin nuget:?package=ModulusKit.Messaging.RabbitMq&version=4.0.0
#tool nuget:?package=ModulusKit.Messaging.RabbitMq&version=4.0.0
ModulusKit.Messaging.RabbitMq
RabbitMQ transport for ModulusKit.Messaging, built directly on the OSS RabbitMQ.Client — no MassTransit dependency.
Usage
builder.Services.AddModulusMessaging(builder.Configuration, options =>
{
options.Assemblies.Add(typeof(Program).Assembly);
});
builder.Services.AddModulusRabbitMqTransport();
{
"Messaging": {
"Transport": "RabbitMq",
"ConnectionString": "amqp://guest:guest@localhost:5672/",
"EndpointName": "my-service"
}
}
Topology
| Entity | Name | Purpose |
|---|---|---|
| Fanout exchange | <event type full name, lower-cased> |
One per event type; publish target |
| Queue | <EndpointName> |
One per endpoint; bound to every subscribed exchange; replicas compete |
| Dead-letter exchange | <EndpointName>.dlx |
Target of x-dead-letter-exchange |
| Dead-letter queue | <EndpointName>.dead-letter |
Messages that exhausted ConsumerRetry |
Publisher confirmations are enabled: a failed confirm surfaces as an exception the outbox retries. Topology is declared automatically on startup and first publish; set Messaging:AutoProvision to false for least-privilege deployments with pre-created entities.
Testing
RabbitMqTopology (naming) and RabbitMqEnvelopeMapper (envelope/property mapping) are pure and unit-tested in Modulus.Messaging.Tests/RabbitMq. tests/Modulus.Messaging.RabbitMq.IntegrationTests runs the transport against a real broker via Testcontainers (Category=Integration), covering: publish/consume roundtrip, dead-lettering after retry exhaustion, inbox deduplication of redelivered messages, acknowledgement (not dead-lettering) of an unknown message type, a stop/start consume cycle, AutoProvision=false against topology declared out-of-band, concurrent multi-event-type publishing, and draining an in-flight handler during StopConsumingAsync.
Explicitly untested: forced publisher-confirm failure (the broker rejecting/returning a confirm) and connection-recovery chaos (broker restart/network partition mid-operation, exercising RabbitMQ.Client's AutomaticRecoveryEnabled/TopologyRecoveryEnabled). Both require fault injection against the broker connection that Testcontainers' black-box container model does not give an easy hook for; a toxiproxy-style fault-injecting proxy in front of the container would be needed to cover them.
License
MIT — part of the Modulus project.
| 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 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. |
-
net10.0
- Azure.Core (>= 1.47.1)
- Microsoft.EntityFrameworkCore (>= 10.0.3)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.3)
- Microsoft.Extensions.Configuration (>= 10.0.3)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.3)
- Microsoft.Extensions.DependencyInjection (>= 10.0.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.3)
- Microsoft.Extensions.Diagnostics.Abstractions (>= 10.0.3)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.3)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.3)
- Microsoft.Extensions.Logging (>= 10.0.3)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.3)
- ModulusKit.Messaging (>= 4.0.0)
- RabbitMQ.Client (>= 7.2.1)
-
net8.0
- Azure.Core (>= 1.47.1)
- Microsoft.EntityFrameworkCore (>= 8.0.29)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.29)
- Microsoft.Extensions.Configuration (>= 10.0.3)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.3)
- Microsoft.Extensions.DependencyInjection (>= 10.0.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.3)
- Microsoft.Extensions.Diagnostics.Abstractions (>= 10.0.3)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.3)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.3)
- Microsoft.Extensions.Logging (>= 10.0.3)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.3)
- ModulusKit.Messaging (>= 4.0.0)
- RabbitMQ.Client (>= 7.2.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.