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
We need to install Rabbit MQ software from Rabbit MQ download page
Pika is a RabbitMQ client library for Python.
We can install it using pip command in the terminal:
pip install pika
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.
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 ".*" ".*" ".*"