Overview
RabbitMQ is a robust message broker with advanced routing capabilities, making it ideal for complex messaging scenarios.Installation
Enable RabbitMQ support in yourCargo.toml:
Connection
Connection URL formats
Starting RabbitMQ
Docker
http://localhost:15672 (guest/guest).
With custom credentials
Features
Connection pooling
RabbitMQ usesdeadpool-lapin for connection pooling:
Message scheduling
Install the plugin
Use scheduling
RabbitMQ concepts
Broccoli abstracts RabbitMQ concepts, but understanding them helps with debugging:Management API
With themanagement feature:
Configuration example
Best practices
Use virtual hosts
Use virtual hosts
Separate environments using virtual hosts:
Enable publisher confirms
Enable publisher confirms
RabbitMQ provides publisher confirms for guaranteed delivery. Broccoli uses these internally for reliability.
Monitor via management UI
Monitor via management UI
Use the RabbitMQ management UI (
localhost:15672) to:- View queue depths
- Monitor connection counts
- Check message rates
- Debug delivery issues
Configure memory limits
Configure memory limits
Set RabbitMQ memory limits to prevent OOM: