RabbitMQ is a message broker that enables applications to communicate through message queues. It comes with a web-based management interface.
Enable RabbitMQ during the initial setup:
dev setupIf you've already set up your environment, enable RabbitMQ by creating a configuration marker:
mkdir -p conf/rabbitmq
dev rebuildTo connect to RabbitMQ from your applications, use:
- Host:
rabbitmq - Port:
5672(AMQP protocol) - Management Port:
15672(Web interface) - Default credentials:
guest/guest
Access the RabbitMQ management web interface at: http://localhost:15672
Login with:
- Username:
guest - Password:
guest
The management interface allows you to:
- Monitor queues and exchanges
- View message rates
- Manage connections and channels
- Create and configure queues
- Send test messages
dev consoleIn your application:
$connection = new AMQPConnection([
'host' => 'rabbitmq',
'port' => 5672,
'vhost' => '/',
'login' => 'guest',
'password' => 'guest'
]);
$connection->connect();In your env.php:
'queue' => [
'amqp' => [
'host' => 'rabbitmq',
'port' => '5672',
'user' => 'guest',
'password' => 'guest',
'virtualhost' => '/'
]
]Verify RabbitMQ is running:
dev ps | grep rabbitmqCheck RabbitMQ logs:
dev logs rabbitmq