Sending and receiving messages using RabbitMQ C#
- RabbitMQ requires Erlang to be installed on your machine. You can download it from the official Erlang website
- Download and Install RabbitMQ
Open a command prompt and navigate to the RabbitMQ sbin directory. Run the following command to enable the management plugin:
rabbitmq-plugins enable rabbitmq_management
In windows type rabbitMQ and click to start the service
Go to the browser and http://localhost:15672
In Visual studio 2022, install nuget packet: rabbitmq.client
This solution conatins two projects:
- Sender project, which is web api two two enpoints, one post to send message and get to get to read all the message in the queue
- Receiver project, which reads the messages from the queue