Skip to main content

Overview

Redis is the default broker for Broccoli. It provides fast, in-memory message storage with persistence options.

Installation

Redis support is enabled by default:
Or explicitly:

Connection

Connection URL formats

Starting Redis

Docker

With persistence

With password

Features

Connection pooling

Redis uses bb8-redis for connection pooling:

Fairness queues

Redis supports fairness queues through disambiguators, ensuring fair processing across different message categories:

Message scheduling

Redis supports delayed message delivery:

Redis data structures

Broccoli uses the following Redis keys:

Management API

With the management feature enabled:

Best practices

Set pool connections based on your workload:
  • Low traffic: 5-10 connections
  • Medium traffic: 10-20 connections
  • High traffic: 20-50 connections
Use Redis persistence (RDB or AOF) in production to prevent message loss:
Monitor Redis memory, especially with large message payloads:
For high-volume applications, consider Redis Cluster for horizontal scaling.

Troubleshooting

Connection refused

Ensure Redis is running and accessible:

Authentication failed

Include credentials in your connection URL:

Pool exhausted

If you see timeout errors, increase pool size: