Sparkdo.MassHub.Transport.RabbitMQ 1.0.3

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Sparkdo.MassHub.Transport.RabbitMQ --version 1.0.3
                    
NuGet\Install-Package Sparkdo.MassHub.Transport.RabbitMQ -Version 1.0.3
                    
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="Sparkdo.MassHub.Transport.RabbitMQ" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sparkdo.MassHub.Transport.RabbitMQ" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Sparkdo.MassHub.Transport.RabbitMQ" />
                    
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 Sparkdo.MassHub.Transport.RabbitMQ --version 1.0.3
                    
#r "nuget: Sparkdo.MassHub.Transport.RabbitMQ, 1.0.3"
                    
#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 Sparkdo.MassHub.Transport.RabbitMQ@1.0.3
                    
#: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=Sparkdo.MassHub.Transport.RabbitMQ&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Sparkdo.MassHub.Transport.RabbitMQ&version=1.0.3
                    
Install as a Cake Tool

Sparkdo.MassHub.Transport.RabbitMQ

Sparkdo 消息总线的 RabbitMQ 传输实现,基于 AMQP 0-9-1 协议提供生产级消息传递。

功能特性

  • AMQP 0-9-1 协议:通过 RabbitMQ.Client 库实现标准 AMQP 通信
  • Exchange/Queue/Binding 拓扑:完整的 RabbitMQ 拓扑模型,支持 Direct、Fanout、Topic 等交换机类型
  • 路由键支持RabbitMQRoutingKeyMiddleware 自动从消息中提取路由键
  • 队列模式:支持 Lazy、Default 等多种队列模式,以及 Quorum 和 Classic 队列类型
  • 消息确认RabbitMQAcknowledgementMiddleware 确保消息可靠消费
  • 自动重连RabbitMQConsumerManager 内置消费者自动重连机制

安装

dotnet add package Sparkdo.MassHub.Transport.RabbitMQ

使用示例

// 使用默认配置
services.AddMessageBusHostedService(builder => builder.AddRabbitMQ());

// 完整配置
services.AddMessageBusHostedService(builder =>
{
    builder.AddRabbitMQ(transport =>
    {
        transport.ConnectionString("amqp://guest:guest@localhost:5672");
        transport.AddExchange("order-events", exchange =>
        {
            exchange.ExchangeType = RabbitMQExchangeType.Topic;
            exchange.AddQueue("order-queue", queue =>
            {
                queue.QueueType = RabbitMQQueueType.Quorum;
                queue.Consume<OrderCreated>();
            });
        });
    });
});
Product 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. 
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.0.4-preview.3 49 6/8/2026
1.0.4-preview.2 42 6/7/2026
1.0.4-preview.1 44 6/7/2026
1.0.3 86 6/6/2026