Sencilla.Messaging.RabbitMQ
10.0.69
dotnet add package Sencilla.Messaging.RabbitMQ --version 10.0.69
NuGet\Install-Package Sencilla.Messaging.RabbitMQ -Version 10.0.69
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="Sencilla.Messaging.RabbitMQ" Version="10.0.69" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sencilla.Messaging.RabbitMQ" Version="10.0.69" />
<PackageReference Include="Sencilla.Messaging.RabbitMQ" />
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 Sencilla.Messaging.RabbitMQ --version 10.0.69
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sencilla.Messaging.RabbitMQ, 10.0.69"
#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 Sencilla.Messaging.RabbitMQ@10.0.69
#: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=Sencilla.Messaging.RabbitMQ&version=10.0.69
#tool nuget:?package=Sencilla.Messaging.RabbitMQ&version=10.0.69
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Sencilla.Messaging.RabbitMQ
RabbitMQ provider for the Sencilla messaging framework.
Features
- Integrates with the Sencilla messaging pipeline (dispatcher, middleware, consumers)
- Supports queues (point-to-point) and topics (pub/sub via fanout exchanges)
- Automatic topology declaration (queues, exchanges, dead letter queues)
- Health checks for monitoring RabbitMQ connectivity
- Fluent configuration API consistent with other Sencilla providers
Configuration
services.AddSencillaMessaging(o =>
{
o.UseRabbitMQ(c =>
{
// RabbitMQ connection options
c.WithOptions(opts =>
{
opts.ConnectionString = "amqp://guest:guest@localhost:5672/";
opts.PrefetchCount = 10;
opts.EnableDeadLetterQueue = true;
});
// Define streams (queues and topics)
c.AddStreams(s =>
{
s.AddQueue("order-events");
s.AddQueue("notifications");
s.AddTopic("broadcast-events");
});
// Route message types to streams
c.AddRoutes(r =>
{
r.Send<OrderPlacedEvent>().ToStream("order-events");
r.Send<NotificationMessage>().ToStream("notifications");
});
// Configure consumers
c.AddConsumers(consumers =>
{
consumers.ForQueue("order-events", cfg =>
{
cfg.MaxConcurrentHandlers = 5;
cfg.PrefetchCount = 10;
});
consumers.ForQueue("notifications");
});
});
});
Attribute-based routing
[Stream("order-events")]
public class OrderPlacedEvent
{
public string OrderId { get; set; }
public decimal Amount { get; set; }
}
Publishing messages
public class OrderService(IMessageDispatcher dispatcher)
{
public async Task PlaceOrder(Order order)
{
// Process order...
await dispatcher.Send(new OrderPlacedEvent
{
OrderId = order.Id,
Amount = order.Total
});
}
}
Handling messages
public class OrderPlacedHandler : IMessageHandler<OrderPlacedEvent>
{
public async Task HandleAsync(OrderPlacedEvent message, CancellationToken token)
{
// Process the order event
}
}
// Register handler
services.AddTransient<IMessageHandler<OrderPlacedEvent>, OrderPlacedHandler>();
Consumer modes
By default, consumers auto-start as a BackgroundService. For standalone worker services:
c.AutoStartConsumers = false; // Register as singleton, not hosted service
Then inject and run manually:
public class MyWorker(
MessageStreamsConsumer<RabbitMQStreamProvider, RabbitMQProviderConfig> consumer) : BackgroundService
{
protected override Task ExecuteAsync(CancellationToken stoppingToken)
=> consumer.ExecuteConsumersAsync(stoppingToken);
}
Topology management
For advanced scenarios, inject IRabbitMQTopologyManager directly:
public class SetupService(IRabbitMQTopologyManager topology)
{
public async Task SetupAsync()
{
await topology.DeclareExchangeAsync("events", ExchangeType.Topic);
await topology.DeclareQueueAsync("user-events");
await topology.BindQueueAsync("user-events", "events", "user.*");
await topology.SetupDeadLetterQueueAsync("user-events");
}
}
Health checks
Health checks are registered automatically with the rabbitmq tag:
app.MapHealthChecks("/health");
Configuration options
| Option | Description | Default |
|---|---|---|
ConnectionString |
AMQP connection URI | amqp://guest:guest@localhost:5672/ |
DefaultExchange |
Default exchange name | "" (nameless) |
PrefetchCount |
Consumer prefetch count | 10 |
AutoDeclareTopology |
Auto-declare queues/exchanges | true |
EnableDeadLetterQueue |
Enable DLQ support | true |
DeadLetterExchange |
DLX name | dlx |
DeadLetterQueue |
DLQ suffix | dlq |
MessageTtlMilliseconds |
Message TTL (0 = no expiration) | 0 |
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- RabbitMQ.Client (>= 7.2.0)
- Sencilla.Messaging (>= 10.0.69)
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 |
|---|---|---|
| 10.0.69 | 85 | 10/15/2026 |
| 10.0.68 | 78 | 10/14/2026 |
| 10.0.67 | 93 | 10/9/2026 |
| 10.0.66 | 117 | 9/25/2026 |
| 10.0.64 | 113 | 9/20/2026 |
| 10.0.63 | 107 | 9/17/2026 |
| 10.0.62 | 119 | 9/9/2026 |
| 10.0.61 | 103 | 9/9/2026 |
| 10.0.59 | 159 | 8/21/2026 |
| 10.0.58 | 114 | 8/21/2026 |
| 10.0.57 | 102 | 8/21/2026 |
| 10.0.56 | 111 | 8/21/2026 |
| 10.0.55 | 123 | 8/18/2026 |
| 10.0.54 | 121 | 8/14/2026 |
| 10.0.53 | 133 | 8/10/2026 |
| 10.0.52 | 126 | 8/7/2026 |
| 10.0.51 | 121 | 8/5/2026 |
| 10.0.50 | 115 | 8/5/2026 |
| 10.0.49 | 135 | 7/31/2026 |
| 10.0.48 | 134 | 7/23/2026 |
Loading failed