Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 895 Bytes

README.md

File metadata and controls

29 lines (22 loc) · 895 Bytes

CozyBus

CozyBus is a lightweight message bus for your project

Build status GitHub stars

Usage RabbitMQ

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);
});