Purview.Containers.RabbitMq
1.0.0-prerelease.10
dotnet add package Purview.Containers.RabbitMq --version 1.0.0-prerelease.10
NuGet\Install-Package Purview.Containers.RabbitMq -Version 1.0.0-prerelease.10
<PackageReference Include="Purview.Containers.RabbitMq" Version="1.0.0-prerelease.10" />
<PackageVersion Include="Purview.Containers.RabbitMq" Version="1.0.0-prerelease.10" />
<PackageReference Include="Purview.Containers.RabbitMq" />
paket add Purview.Containers.RabbitMq --version 1.0.0-prerelease.10
#r "nuget: Purview.Containers.RabbitMq, 1.0.0-prerelease.10"
#:package Purview.Containers.RabbitMq@1.0.0-prerelease.10
#addin nuget:?package=Purview.Containers.RabbitMq&version=1.0.0-prerelease.10&prerelease
#tool nuget:?package=Purview.Containers.RabbitMq&version=1.0.0-prerelease.10&prerelease
Purview.Containers.RabbitMq
Throwaway RabbitMQ brokers for .NET integration testing on WSL Containers (WSLC) or Docker.
dotnet add package Purview.Containers.RabbitMq
Backend-neutral: depends on Purview.Containers.Core and needs a backend package (Purview.Containers.Wsl or Purview.Containers.Docker). RabbitMQ.Client is not referenced by this package —
bring your own client.
Requirements
- WSL Containers backend: Windows 10/11 with WSL Containers (
wsl --install --no-distribution), and a.NET 10or later project. A platform-neutralnet10.0project binds the portable facade and gets automatic WSLC-or-Docker selection; a Windows target framework (net10.0-windows10.0.19041.0, x64 or arm64) binds the implementation directly. ThePurview.Containers.Wslpackage suppliesbuildTransitivedefaults forWindowsSdkPackageVersion/PlatformTargetand (for a platform-neutral consumer on a Windows build host) the implementation payload, rejecting an unsupported consumer withPCC0001/PCC0002— see the consumer requirements. - Docker backend: any reachable Docker daemon (
docker info), with anet10.0or later project on any platform. No Windows target framework and noPCCguards apply. - Experimental: the API, defaults and packaging can change between prereleases; there is no production support guarantee.
Quick start
using Purview.Containers.RabbitMq;
using RabbitMQ.Client;
await using var rabbitMq = new RabbitMqBuilder()
.WithUsername("guest")
.WithPassword("guest")
.Build();
await rabbitMq.StartAsync(); // waits for 'Server startup complete'
var factory = new ConnectionFactory { Uri = rabbitMq.GetAmqpEndpoint() };
await using var connection = await factory.CreateConnectionAsync();
API
| Member | Purpose |
|---|---|
RabbitMqBuilder() / RabbitMqBuilder(string image) |
Default image rabbitmq:3-management (management plugin included), or a custom image. |
RabbitMqBuilder.AmqpPort (5672), ManagementPort (15672) |
Container ports, both mapped to random host ports. |
WithUsername(string) |
Sets RABBITMQ_DEFAULT_USER (default guest). |
WithPassword(string) |
Sets RABBITMQ_DEFAULT_PASS (default guest); stored as a redacted Secret. |
WithVirtualHost(string) |
Sets RABBITMQ_DEFAULT_VHOST (default /). |
RabbitMqContainer.GetAmqpEndpoint() |
amqp://user:pass@localhost:{port}/{vhost} as a Uri for ConnectionFactory.Uri. |
RabbitMqContainer.GetConnectionString() |
The same AMQP endpoint as a string. |
RabbitMqContainer.GetManagementEndpoint() |
Management web UI endpoint (http://localhost:{mappedPort}). |
Build() rejects an empty username, password or virtual host with ContainerConfigurationException.
Call the endpoint accessors after StartAsync().
Readiness
The default wait strategy matches the canonical Server startup complete log line rather than running
rabbitmq-diagnostics ping: under WSLC an exec-based probe races the Erlang cookie setup and can trigger a
startup failure (eacces reading .erlang.cookie). See
Modules for the full note.
Documentation
- Backends: WSLC or Docker — choosing and configuring the runtime.
- Modules — the module contract and readiness choices.
- Wait Strategies — overriding readiness checks.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Microsoft.Extensions.Telemetry.Abstractions (>= 10.11.0)
- Purview.Containers.Core (>= 1.0.0-prerelease.10)
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.0-prerelease.10 | 39 | 10/29/2026 |
| 1.0.0-prerelease.9 | 46 | 10/27/2026 |
| 1.0.0-prerelease.8 | 59 | 10/22/2026 |
| 1.0.0-prerelease.7 | 66 | 10/16/2026 |
| 1.0.0-prerelease.6 | 63 | 10/6/2026 |
| 1.0.0-prerelease.5 | 62 | 10/2/2026 |
| 1.0.0-prerelease.4 | 60 | 10/2/2026 |
| 1.0.0-prerelease.3 | 57 | 10/2/2026 |
| 1.0.0-prerelease.2 | 66 | 10/1/2026 |