Aj.RabbitMQ.Core
1.0.29
See the version list below for details.
dotnet add package Aj.RabbitMQ.Core --version 1.0.29
NuGet\Install-Package Aj.RabbitMQ.Core -Version 1.0.29
<PackageReference Include="Aj.RabbitMQ.Core" Version="1.0.29" />
<PackageVersion Include="Aj.RabbitMQ.Core" Version="1.0.29" />
<PackageReference Include="Aj.RabbitMQ.Core" />
paket add Aj.RabbitMQ.Core --version 1.0.29
#r "nuget: Aj.RabbitMQ.Core, 1.0.29"
#:package Aj.RabbitMQ.Core@1.0.29
#addin nuget:?package=Aj.RabbitMQ.Core&version=1.0.29
#tool nuget:?package=Aj.RabbitMQ.Core&version=1.0.29
Aj.RabbitMQ.Core
🚀 Biblioteca .NET para abstração de mensageria no RabbitMQ, totalmente extensível, orientada a microsserviços e multi-tenant.
✨ Recursos
✅ Conexão centralizada (singleton)
✅ Configuração via IConfiguration e DataAnnotations
✅ Declaração de exchanges, filas, bindings padronizados
✅ Suporte a prefetch (QoS)
✅ Envelope de mensagens estruturado (MessageEnvelope)
✅ Retry e DLQ integrado (padrão de robustez)
✅ Helpers para exchanges direct, topic, fanout
✅ Extensões para injeção no IServiceCollection
📦 Instalação
no seu projeto:
dotnet add package Aj.RabbitMQ.Core
⚙️ Configuração
adicione ao seu appsettings.json:
"RabbitMQSettings": {
"HostName": "localhost",
"UserName": "admin",
"Password": "123456",
"VirtualHost": "/",
"Port": 5672,
"RoutingKey": "order.vtex"
}
OBS: A Propriedade "RoutingKey" so deve ser informada para definir em qual fila os consumers devem se conectar, caso o serviço seja um publisher manter como null e definir a routingkey no momento da publicação.
e registre no Program.cs:
builder.Services.AddRabbitMQServices(builder.Configuration);
🚀 Uso Básico
var connectionFactory = serviceProvider.GetRequiredService<RabbitMQConnectionFactory>();
var channel = await connectionFactory.GetChannelAsync();
🟦 Retry + DLQ
por padrão, sugerimos:
- fila normal
- fila
.retrycomx-message-ttl - fila
.dlqpara mensagens definitivas - exchanges:
direct.orderdirect.retrydirect.dlq
📚 Exemplos avançados
declarar exchange
await _channel.ExchangeDeclareAsync(
exchange: "direct.order",
type: "direct",
durable: true,
autoDelete: false
);
declarar fila com TTL + DLQ
await _channel.QueueDeclareAsync(
queue: "order.billing.retry",
durable: true,
exclusive: false,
autoDelete: false,
arguments: new Dictionary<string, object>
{
{ "x-message-ttl", 300000 },
{ "x-dead-letter-exchange", "direct.order" },
{ "x-dead-letter-routing-key", "order.created" }
}
);
✅ Checklist de Qualidade
- Multi-tenant
- Extensível
- Segue princípios SOLID
- Fácil integração com MediatR e Polly
- Suporte ao plugin management do RabbitMQ
👨💻 Contribuições
Pull Requests são muito bem-vindos!
Basta abrir uma issue ou PR neste repositório.
📄 Licença
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. 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. |
-
net9.0
- Microsoft.Extensions.Caching.Memory (>= 10.0.0-preview.3.25171.5)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0-preview.3.25171.5)
- Microsoft.Extensions.Logging.Configuration (>= 10.0.0-preview.3.25171.5)
- Newtonsoft.Json (>= 13.0.4)
- RabbitMQ.Client (>= 7.1.2)
- Serilog (>= 4.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Aj.RabbitMQ.Core:
| Package | Downloads |
|---|---|
|
Aj.Platform.Core
Biblioteca de Uso Geral para integrações com as API OmsAj |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.35 | 64 | 11/19/2025 |
| 1.0.34 | 170 | 11/8/2025 |
| 1.0.33 | 171 | 10/31/2025 |
| 1.0.32 | 80 | 10/31/2025 |
| 1.0.31 | 76 | 10/31/2025 |
| 1.0.30 | 90 | 10/31/2025 |
| 1.0.29 | 137 | 10/30/2025 |
| 1.0.28 | 151 | 10/30/2025 |
| 1.0.27 | 154 | 10/28/2025 |
| 1.0.26 | 142 | 10/28/2025 |
| 1.0.25 | 136 | 10/28/2025 |
| 1.0.24 | 131 | 10/28/2025 |
| 1.0.23 | 293 | 10/2/2025 |
| 1.0.22 | 129 | 10/2/2025 |
| 1.0.21 | 164 | 10/1/2025 |
| 1.0.20 | 205 | 9/25/2025 |
| 1.0.19 | 130 | 9/25/2025 |
| 1.0.18 | 132 | 9/25/2025 |
| 1.0.17 | 236 | 9/24/2025 |
| 1.0.16 | 174 | 9/9/2025 |
| 1.0.15 | 125 | 8/20/2025 |
| 1.0.14 | 470 | 8/11/2025 |
| 1.0.13 | 240 | 8/6/2025 |
| 1.0.12 | 216 | 8/6/2025 |
| 1.0.11 | 214 | 8/5/2025 |
| 1.0.10 | 222 | 8/5/2025 |
| 1.0.9 | 67 | 8/1/2025 |
| 1.0.8 | 474 | 7/24/2025 |
| 1.0.7 | 154 | 7/15/2025 |
| 1.0.6 | 249 | 7/15/2025 |
| 1.0.5 | 169 | 7/15/2025 |
| 1.0.1 | 122 | 6/27/2025 |
Versão inicial do Aj.RabbitMQ.Core com suporte a exchanges, filas, retry e dead-letter queues.