Skip to main content

Supported brokers

Broccoli supports multiple message brokers through feature flags:

How broker selection works

Broccoli automatically selects the broker based on your connection URL:
You must enable the appropriate feature flag for your broker. If you use a URL scheme without the corresponding feature enabled, you’ll get a compile-time error.

Choosing a broker

Redis

Best for: General purpose, high throughput, simple setup
  • Fast in-memory storage
  • Simple operational model
  • Good for most use cases
  • Supports fairness queues

RabbitMQ

Best for: Complex routing, enterprise messaging
  • Robust message delivery guarantees
  • Advanced routing capabilities
  • Excellent monitoring tools
  • Supports delayed/scheduled messages (with plugin)

SurrealDB

Best for: When you already use SurrealDB, embedded queues
  • Use your existing database
  • In-memory option for testing
  • Good for embedded scenarios

Feature comparison

Enabling multiple brokers

You can enable multiple brokers in your project:
This allows your application to connect to different brokers at runtime:

Connection URL formats

Broker configuration

All brokers share common configuration through the builder:
See the individual broker pages for broker-specific options and considerations.