ProtoTest.Messaging.RabbitMq
1.1.2
See the version list below for details.
dotnet add package ProtoTest.Messaging.RabbitMq --version 1.1.2
NuGet\Install-Package ProtoTest.Messaging.RabbitMq -Version 1.1.2
<PackageReference Include="ProtoTest.Messaging.RabbitMq" Version="1.1.2" />
<PackageVersion Include="ProtoTest.Messaging.RabbitMq" Version="1.1.2" />
<PackageReference Include="ProtoTest.Messaging.RabbitMq" />
paket add ProtoTest.Messaging.RabbitMq --version 1.1.2
#r "nuget: ProtoTest.Messaging.RabbitMq, 1.1.2"
#:package ProtoTest.Messaging.RabbitMq@1.1.2
#addin nuget:?package=ProtoTest.Messaging.RabbitMq&version=1.1.2
#tool nuget:?package=ProtoTest.Messaging.RabbitMq&version=1.1.2
ProtoTest.Messaging.RabbitMq
The RabbitMQ adapter for ProtoTest.Messaging.
dotnet add package ProtoTest.Messaging.RabbitMq
Register it with UseRabbitMq(). Messages are published to exchanges and each test receives its own temporary queue for destinations it awaits. Declare them in code with Tap, so the tap binds during setup and does not miss a message published earlier in the test:
builder.AddMessaging(messaging => messaging.Tap("invoice-paid").UseRabbitMq());
A destination the suite owns and nothing else declares is created with Declare, once per run during setup and before any tap binds: a fanout, durable, non-auto-delete exchange. A suite that owns the broker and publishes its own events needs no raw broker client:
builder.AddMessaging(messaging => messaging
.Declare("invoice-paid")
.Tap("invoice-paid")
.UseRabbitMq());
A destination that already exists with that shape, or a repeated declaration, is a no-op.
ProtoDestination.Queue(...) consumes a queue as it exists instead of binding to an exchange, which is how a dead-letter queue is awaited: the queue is never declared, purged or deleted, and what the test reads is removed. A queue with another reader is shared, so prefer the exchange that feeds it where the suite runs in parallel.
A publish can name a routing key, and an await can select one; the delivery carries it in message.RoutingKey.
The RabbitMQ connection is shared for the run, while awaited messages remain isolated per test.
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.1.2)
- ProtoTest.Messaging (>= 1.1.2)
- RabbitMQ.Client (>= 7.2.2)
-
net8.0
- ProtoTest.Core (>= 1.1.2)
- ProtoTest.Messaging (>= 1.1.2)
- RabbitMQ.Client (>= 7.2.2)
-
net9.0
- ProtoTest.Core (>= 1.1.2)
- ProtoTest.Messaging (>= 1.1.2)
- RabbitMQ.Client (>= 7.2.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.