AspireMassTransit.RabbitMQ.Client 1.2.1

dotnet add package AspireMassTransit.RabbitMQ.Client --version 1.2.1
                    
NuGet\Install-Package AspireMassTransit.RabbitMQ.Client -Version 1.2.1
                    
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="AspireMassTransit.RabbitMQ.Client" Version="1.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AspireMassTransit.RabbitMQ.Client" Version="1.2.1" />
                    
Directory.Packages.props
<PackageReference Include="AspireMassTransit.RabbitMQ.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AspireMassTransit.RabbitMQ.Client --version 1.2.1
                    
#r "nuget: AspireMassTransit.RabbitMQ.Client, 1.2.1"
                    
#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.
#:package AspireMassTransit.RabbitMQ.Client@1.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AspireMassTransit.RabbitMQ.Client&version=1.2.1
                    
Install as a Cake Addin
#tool nuget:?package=AspireMassTransit.RabbitMQ.Client&version=1.2.1
                    
Install as a Cake Tool

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 was computed.  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 was computed.  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. 
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
1.2.1 1,802 12/4/2024
1.1.1 177 11/26/2024
1.1.0 118 11/25/2024
1.0.2 121 11/19/2024