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
<PackageReference Include="ProtoTest.Messaging.RabbitMq.Testcontainers" Version="1.0.1" />
<PackageVersion Include="ProtoTest.Messaging.RabbitMq.Testcontainers" Version="1.0.1" />
<PackageReference Include="ProtoTest.Messaging.RabbitMq.Testcontainers" />
paket add ProtoTest.Messaging.RabbitMq.Testcontainers --version 1.0.1
#r "nuget: ProtoTest.Messaging.RabbitMq.Testcontainers, 1.0.1"
#:package ProtoTest.Messaging.RabbitMq.Testcontainers@1.0.1
#addin nuget:?package=ProtoTest.Messaging.RabbitMq.Testcontainers&version=1.0.1
#tool nuget:?package=ProtoTest.Messaging.RabbitMq.Testcontainers&version=1.0.1
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 —
RabbitMqBrokerderivesProtoContainerResource<RabbitMqContainer>withId "broker:rabbitmq",Kind "broker"andDescription "RabbitMQ container"; the default image israbbitmq:3, configurable through theRabbitMqBuilder. - Factories —
Container(configure?)builds without starting,Start(configure?)starts now or throws with the reason, andTryStart(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;AddResourcealone 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
Brokercapability comes fromUseRabbitMq, not the container, andRabbitMqOptions.ConnectionStringSettingis the configuration key the adapter reads. - Broker state —
ConnectionStringis empty until the container starts andIsStartedreports the state; the resource is start-once with a shared start task. - No host extension — the package has no
AddXof its own; register the container withAddInfrastructureand the broker withUseRabbitMq. - 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 | 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 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. |
-
net10.0
- ProtoTest.Core (>= 1.0.1)
- ProtoTest.Testcontainers (>= 1.0.1)
- Testcontainers.RabbitMq (>= 4.15.0)
-
net8.0
- ProtoTest.Core (>= 1.0.1)
- ProtoTest.Testcontainers (>= 1.0.1)
- Testcontainers.RabbitMq (>= 4.15.0)
-
net9.0
- ProtoTest.Core (>= 1.0.1)
- ProtoTest.Testcontainers (>= 1.0.1)
- Testcontainers.RabbitMq (>= 4.15.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.