CommunityToolkit.Aspire.MassTransit.RabbitMQ 9.1.0

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package CommunityToolkit.Aspire.MassTransit.RabbitMQ --version 9.1.0                
NuGet\Install-Package CommunityToolkit.Aspire.MassTransit.RabbitMQ -Version 9.1.0                
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="CommunityToolkit.Aspire.MassTransit.RabbitMQ" Version="9.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CommunityToolkit.Aspire.MassTransit.RabbitMQ --version 9.1.0                
#r "nuget: CommunityToolkit.Aspire.MassTransit.RabbitMQ, 9.1.0"                
#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.
// Install CommunityToolkit.Aspire.MassTransit.RabbitMQ as a Cake Addin
#addin nuget:?package=CommunityToolkit.Aspire.MassTransit.RabbitMQ&version=9.1.0

// Install CommunityToolkit.Aspire.MassTransit.RabbitMQ as a Cake Tool
#tool nuget:?package=CommunityToolkit.Aspire.MassTransit.RabbitMQ&version=9.1.0                

MassTransit RabbitMQ Aspire Client Extension

Overview

This package provides an Aspire client extension for seamlessly integrating MassTransit with RabbitMQ. It works with the Aspire.Hosting.RabbitMQ.AddRabbitMQ() method for hosting.

The name string should match the name used in Aspire.Hosting.RabbitMQ.AddRabbitMQ(), as it references the connection string.


Features

  • Configures MassTransit RabbitMQ integration for clients.
  • Automatically discovers and registers consumers, sagas, and activities.
  • Supports OpenTelemetry and Application Insights for monitoring.
  • Uses the same configuration format as the hosting environment for easy integration.
  • Multi-bus support to configure multiple RabbitMQ instances.

Usage

Installation

To install, add the extension to your client application using builder.Services in Startup.cs or Program.cs.

Example Usage

builder.AddMassTransitRabbitMq(
    "rmq",
    options => { options.DisableTelemetry = false; },
    consumers =>
    {
        consumers.AddConsumer<SubmitOrderConsumer>();
        consumers.AddConsumer<CancelOrderConsumer>();
        consumers.AddConsumer<UpdateOrderConsumer>();
    }
);

Multi-bus example

public interface ISecondBus : IBus;
builder.AddMassTransitRabbitMq("rabbitmq1", massTransitConfiguration: x =>
{
    x.AddConsumer<TestConsumer>();
});
builder.AddMassTransitRabbitMq<ISecondBus>("rabbitmq2", massTransitConfiguration: x =>
{
    x.AddConsumer<TestConsumerTwo>();
});
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. 
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
9.1.1-beta.139 25 1/21/2025
9.1.1-beta.138 29 1/20/2025
9.1.1-beta.137 32 1/17/2025
9.1.1-beta.136 27 1/15/2025
9.1.1-beta.135 8 1/15/2025
9.1.1-beta.134 8 1/15/2025
9.1.1-beta.128 8 1/9/2025
9.1.1-beta.127 7 1/9/2025
9.1.1-beta.126 9 1/9/2025
9.1.1-beta.125 8 1/9/2025
9.1.1-beta.124 5 1/9/2025
9.1.0 127 12/12/2024
9.1.0-beta.123 41 1/3/2025
9.1.0-beta.122 45 1/3/2025
9.1.0-beta.121 44 1/2/2025
9.1.0-beta.120 41 12/30/2024
9.1.0-beta.119 37 12/30/2024
9.1.0-beta.118 43 12/30/2024
9.1.0-beta.116 41 12/30/2024
9.1.0-beta.114 43 12/30/2024
9.1.0-beta.113 41 12/30/2024
9.1.0-beta.112 43 12/18/2024
9.1.0-beta.110 48 12/16/2024
9.1.0-beta.109 48 12/12/2024
9.0.1-beta.108 48 12/12/2024
9.0.1-beta.107 46 12/11/2024
9.0.1-beta.106 47 12/12/2024
9.0.1-beta.104 47 12/11/2024