Skip to content

VSVanadium/RabbitMQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RabbitMQ

Sending and receiving messages using RabbitMQ C#

Prerequisites

  • 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

Start the service

Image Alt Text 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

Project

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

Run both the projects, the sender project looks like this:

Image Alt Text

Send a sample message using api

Image Alt Text

It appear in the RabbitMQ management

Image Alt Text

Call Get endpoint to see the messages

Image Alt Text

About

Sending and receiving messages using RabbitMQ C#

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages