VOOZH about

URL: https://www.nuget.org/packages/Aj.RabbitMQ.Core/

⇱ NuGet Gallery | Aj.RabbitMQ.Core 1.0.50




Aj.RabbitMQ.Core 1.0.50

dotnet add package Aj.RabbitMQ.Core --version 1.0.50
 
 
NuGet\Install-Package Aj.RabbitMQ.Core -Version 1.0.50
 
 
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="Aj.RabbitMQ.Core" Version="1.0.50" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aj.RabbitMQ.Core" Version="1.0.50" />
 
Directory.Packages.props
<PackageReference Include="Aj.RabbitMQ.Core" />
 
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 Aj.RabbitMQ.Core --version 1.0.50
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Aj.RabbitMQ.Core, 1.0.50"
 
 
#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 Aj.RabbitMQ.Core@1.0.50
 
 
#: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=Aj.RabbitMQ.Core&version=1.0.50
 
Install as a Cake Addin
#tool nuget:?package=Aj.RabbitMQ.Core&version=1.0.50
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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 .retry com x-message-ttl
  • fila .dlq para mensagens definitivas
  • exchanges:
    • direct.order
    • direct.retry
    • direct.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 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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 (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.50 274 6/5/2026
1.0.49 653 4/24/2026
1.0.48 481 3/20/2026
1.0.47 107 3/20/2026
1.0.46 327 3/11/2026
1.0.45 367 2/21/2026
1.0.44 587 1/19/2026
1.0.43 131 1/16/2026
1.0.42 180 1/14/2026
1.0.41 130 1/14/2026
1.0.40 155 1/13/2026
1.0.39 173 1/2/2026
1.0.38 371 12/18/2025
1.0.37 480 11/25/2025
1.0.36 180 11/25/2025
1.0.35 451 11/19/2025
1.0.34 300 11/8/2025
1.0.33 262 10/31/2025
1.0.32 142 10/31/2025
1.0.31 136 10/31/2025
Loading failed

Versão inicial do Aj.RabbitMQ.Core com suporte a exchanges, filas, retry e dead-letter queues.