ProtoTest.Messaging.RabbitMq 1.0.1

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

ProtoTest.Messaging.RabbitMq

The RabbitMQ adapter for the messaging capability: publish to exchanges and tap events through a per-test queue per awaited destination.

dotnet add package ProtoTest.Messaging.RabbitMq

Quick start

builder.AddMessaging(messaging => messaging.UseRabbitMq(options =>
{
    // Or set ProtoTest:Messaging:RabbitMq:ConnectionString for the environment.
    options.ConnectionString = "amqp://guest:guest@localhost:5672/";
}));

For a broker the run owns, add the container as infrastructure instead — the started connection string reaches both the adapter and an in-process application, and an explicitly configured string still wins:

builder.AddInfrastructure(RabbitMqBroker.Container(),
    RabbitMqOptions.ConnectionStringSetting, "Messaging:RabbitMq:ConnectionString");
builder.AddMessaging(messaging => messaging.UseRabbitMq());

What it adds

  • AdapterUseRabbitMq(configure?) on the messaging builder attaches a RabbitMqMessageBroker; the first registration wins and all AddMessaging repeat rules apply.
  • Publishing — sends to the exchange named like the destination with the destination as routing key, UTF-8 payloads and ContentType defaulting to application/json.
  • Per-test tap — the test's consumer owns its own channel on the run's shared connection and declares one exclusive, auto-delete queue per awaited destination, bound with the destination routing key and with #; every queue is deleted when the test ends.
  • Connection — one shared connection for the run, released as the run-scoped messaging:broker resource; RabbitMqOptions.ConnectionStringSetting names the key a container fills.
  • Tracing — the same messaging.publish/messaging.await operations and messaging.publish/messaging.receive observations, with messaging.system = "RabbitMQ".

Configuration

Key Type Default
ProtoTest:Messaging:RabbitMq:ConnectionString string amqp://guest:guest@localhost:5672/
ProtoTest:Messaging:RabbitMq:PollInterval TimeSpan 00:00:00.025

A tap has no history: a destination prepared lazily at the await only sees later messages, awaiting drains and discards non-matching messages, and the exchange must already exist — the adapter does not declare application exchanges.

Learn more

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 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. 
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
1.0.1 66 9/20/2026
1.0.0 76 9/20/2026