Setting up RabbitMQ

First, we need to use composer to install RabbitMQ Server and the PHP package for interfacing with RabbitMQ.

composer require php-amqplib/php-amqplib

sudo apt-key adv --keyserver "" --recv-keys "0x6B73A36E6026DFCA"
wget -O - "" | sudo apt-key add -
sudo apt-get install apt-transport-https
sudo apt-get update -y
sudo apt-get install -y erlang
sudo apt-get update
sudo apt-cache policy
sudo apt-get install -y rabbitmq-server

Create user for rabbitMQ and set permissions
only root can create user

sudo su root 
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"

rabbitmq-plugins enable rabbitmq_management

You can now reach RabbitMQ interface at http://localhost:15672

Leave a Reply

Your email address will not be published. Required fields are marked *