Skip to main content
Published
Sep 29, 2026
19d ago
Total Downloads
3.5M
3,516,609

Install

dotnet add package Aspire.Hosting.RabbitMQ --version 13.6.0
ProductVersions
.NET
net8.0

README

RabbitMQ hosting integration

Use this integration to model, configure, and orchestrate a RabbitMQ resource in an Aspire solution.

Getting started

Add the integration

From your AppHost directory, add the Aspire.Hosting.RabbitMQ integration with the Aspire CLI:

aspire add Aspire.Hosting.RabbitMQ

Usage example

In the AppHost, add a RabbitMQ resource and reference it from another resource with either C# or TypeScript:

C#

var rmq = builder.AddRabbitMQ("rmq");

var myService = builder.AddProject<Projects.MyService>()
                       .WithReference(rmq);

TypeScript

const rmq = await builder.addRabbitMQ("rmq");

const myService = await builder.addNodeApp("myService", "../my-service", "server.js")
                       .withReference(rmq);

Connection Properties

When you reference a RabbitMQ resource using WithReference, the following connection properties are made available to the consuming project:

RabbitMQ server

The RabbitMQ server resource exposes the following connection properties:

Property Name Description
Host The hostname or IP address of the RabbitMQ server
Port The port number the RabbitMQ server is listening on
Username The username for authentication
Password The password for authentication
Uri The connection URI, with the format amqp://{Username}:{Password}@{Host}:{Port}

Aspire exposes each property as an environment variable named [RESOURCE]_[PROPERTY]. For instance, the Uri property of a resource called db1 becomes DB1_URI.

Additional documentation

Feedback & contributing

https://github.com/microsoft/aspire

Changes from Previous Version

v13.5.4v13.6.0
Added Dependencies
Hex1b(net8.0)
MessagePack(net8.0)
Removed Dependencies

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.The published metadata declares 34 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.