Skip to main content

Overview

RabbitMQ is a robust message broker with advanced routing capabilities, making it ideal for complex messaging scenarios.

Installation

Enable RabbitMQ support in your Cargo.toml:
Or alongside Redis:

Connection

Connection URL formats

Starting RabbitMQ

Docker

Access the management UI at http://localhost:15672 (guest/guest).

With custom credentials

Features

Connection pooling

RabbitMQ uses deadpool-lapin for connection pooling:

Message scheduling

Message scheduling with RabbitMQ requires the delayed-exchange plugin.

Install the plugin

See the RabbitMQ scheduling guide for details.

Use scheduling

RabbitMQ concepts

Broccoli abstracts RabbitMQ concepts, but understanding them helps with debugging:

Management API

With the management feature:

Configuration example

Best practices

Separate environments using virtual hosts:
RabbitMQ provides publisher confirms for guaranteed delivery. Broccoli uses these internally for reliability.
Use the RabbitMQ management UI (localhost:15672) to:
  • View queue depths
  • Monitor connection counts
  • Check message rates
  • Debug delivery issues
Set RabbitMQ memory limits to prevent OOM:

Troubleshooting

Connection refused

Verify RabbitMQ is running:

ACCESS_REFUSED

Check credentials in your connection URL:

NOT_FOUND for scheduled messages

Enable the delayed message exchange plugin:

High memory usage

RabbitMQ can accumulate messages in memory. Monitor and set limits: