CozyBus is a lightweight message bus for your project
appsettings.json
"RabbitOptions": {
"Url": "localhost",
"Username": "guest",
"Password": "guest",
"Port": 5672
}
configure services
var rabbitOptions = new RabbitOptions();
configuration.GetSection(nameof(RabbitOptions)).Bind(rabbitOptions);
services.UseRabbitMqMessageBus(builder =>
{
builder.WithConnection(rabbitOptions.Url);
builder.WithUsername(rabbitOptions.Username);
builder.WithPassword(rabbitOptions.Password);
builder.WithPort(rabbitOptions.Port);
});