now running on .NET 6 RC1
- Custom RabbitMQ ILogger Provider
- RabbitMQ.Client Publish
- RabbitMQ.Client Consume
Check blog if you want.
- Add RabbitMQLogger & RabbitMQLoggerProvider RabbitMQLoggerProvider.cs
- Add customer logger extension ConfigExtension.cs
- Add into ILogger in Program.cs
- nuget package RabbitMQ.Client
- Add RabbitMQHelper.cs handle connection and publish
- DI it in Program.cs
- LogInformation [here]
- LogError [here]
I am lazy to create frontend to read consumed queue, so use background worker, write in console.
- Add BackgroundTask to handle worker BackgroundTask.cs
- Add ConsumeWorker ConsumeWorker.cs
You can join those in one worker if you only have one.
- DI it in Program.cs