ProtoTest.Messaging.RabbitMq.Testcontainers 1.0.1

dotnet add package ProtoTest.Messaging.RabbitMq.Testcontainers --version 1.0.1
                    
NuGet\Install-Package ProtoTest.Messaging.RabbitMq.Testcontainers -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.Testcontainers" 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.Testcontainers" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="ProtoTest.Messaging.RabbitMq.Testcontainers" />
                    
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.Testcontainers --version 1.0.1
                    
#r "nuget: ProtoTest.Messaging.RabbitMq.Testcontainers, 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.Testcontainers@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.Testcontainers&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=ProtoTest.Messaging.RabbitMq.Testcontainers&version=1.0.1
                    
Install as a Cake Tool

ProtoTest.Messaging.RabbitMq.Testcontainers

A RabbitMQ container owned as a run-scoped resource, so a suite can exercise messaging against a real broker without external setup.

dotnet add package ProtoTest.Messaging.RabbitMq.Testcontainers

Quick start

builder.AddInfrastructure(
    RabbitMqBroker.Container(),
    RabbitMqOptions.ConnectionStringSetting,
    "Messaging:RabbitMq:ConnectionString");

builder.AddMessaging(messaging => messaging.UseRabbitMq());

What it adds

  • Container resource — RabbitMqBroker derives ProtoContainerResource<RabbitMqContainer> with Id "broker:rabbitmq", Kind "broker" and Description "RabbitMQ container"; the default image is rabbitmq:3, configurable through the RabbitMqBuilder.
  • Factories — Container(configure?) builds without starting, Start(configure?) starts now or throws with the reason, and TryStart(configure, out broker, out error) reports failure instead of throwing.
  • Registration — AddInfrastructure(broker, RabbitMqOptions.ConnectionStringSetting, "Messaging:RabbitMq:ConnectionString") starts it with the run and fills both keys, so the adapter and an in-process application reach the same broker; AddResource alone only owns its release.
  • Lifecycle — started once per run and released when the host is disposed, after the run stopped and the reports were written.
  • Capability and keys — the Broker capability comes from UseRabbitMq, not the container, and RabbitMqOptions.ConnectionStringSetting is the configuration key the adapter reads.
  • Broker state — ConnectionString is empty until the container starts and IsStarted reports the state; the resource is start-once with a shared start task.
  • No host extension — the package has no AddX of its own; register the container with AddInfrastructure and the broker with UseRabbitMq.
  • Image — rabbitmq:3; pass a builder action to pin another tag or configure the container.

Configuration

No options type of its own: the default image is rabbitmq:3 and further container settings come from the RabbitMqBuilder passed to Container/Start/TryStart; the connection string flows through the keys passed to AddInfrastructure. The shape matches ProtoTest.Sql.Testcontainers.

The container starts with the host — before any test-level skip condition — so a missing container runtime fails the run at start. Use TryStart in the suite fixture before registering to choose another mode or skip the suite; [RequiresCapability(ProtoCapabilityKinds.Broker)] still guards tests individually.

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 84 9/20/2026
1.0.0 79 9/20/2026