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
                    
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="ModulusKit.Messaging.RabbitMq" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ModulusKit.Messaging.RabbitMq" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ModulusKit.Messaging.RabbitMq" />
                    
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 ModulusKit.Messaging.RabbitMq --version 4.0.0
                    
#r "nuget: ModulusKit.Messaging.RabbitMq, 4.0.0"
                    
#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 ModulusKit.Messaging.RabbitMq@4.0.0
                    
#: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=ModulusKit.Messaging.RabbitMq&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ModulusKit.Messaging.RabbitMq&version=4.0.0
                    
Install as a Cake Tool

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 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. 
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
4.0.0 100 7/26/2026
3.1.0 299 7/26/2026
3.0.0 239 7/26/2026
2.1.0 105 7/4/2026
2.0.0 106 7/3/2026