This is a simple example of a consumer-publisher model using RabbitMQ
.
The consumer is a simple C# console app that listens to a queue and prints messages to the console.
The publisher is a simple C# console app that sends messages to a queue.
docker-compose.yml
: This file contains theRabbitMQ
configuration.src/consumer.csproj
: This is the consumer project.src/publisher.csproj
: This is the publisher project.
- Clone the repository
- Modify
docker-compose.yml
to set theRabbitMQ
persistent volume data location - Run
docker-compose up -d
to startRabbitMQ
- Run the consumer project (Debug > Start new instance)
- Run the publisher project (Debug > Start new instance)