Skip to content

Sudeep99/RabbitMQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sending and Receiving messages using RabbitMQ (python)

To send and receive in localhost, use the code from /LocalHost
To send and receive over the network, use the code from /Over the Network

Follow the below steps for running RabbitMQ sucessfully.

1. Install Rabbit MQ:

We need to install Rabbit MQ software from Rabbit MQ download page

2. Install Pika:

Pika is a RabbitMQ client library for Python.
We can install it using pip command in the terminal:

pip install pika

3. Running the Rabbit MQ file:

We need to run the downloaded Rabbit MQ file. We need to install Erlang for RabbitMQ to run.
The downloaded Setup file will download and install Erlang if it is not installed before.

4. Creating a username and password:

This step is only required if you are send the messages over the network
Use the below commands in the terminal.

  • To add a username and password use the below command:
rabbitmqctl add_user username password
  • To make the user an administrator:
rabbitmqctl set_user_tags username administrator
  • To give all the previlages to the user:
rabbitmqctl set_permissions -p / username ".*" ".*" ".*"

5. Now run Receive.py and wait until you receive the message "Ready to receive messages..."

6. Now run Send.py in a seperate windows and check if the messages are received in the Receive.py window.

LICENSE

About

Sending and Receiving messages using RabbitMQ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages