Add initial support for message broker backends.
Review Request #15196 — Created July 24, 2026 and updated
This introduces
reviewboard.broker, which provides official support in
Review Board for communicating with message brokers (such as RabbitMQ)
and sending tasks or broadcasts to any workers connected to the broker.This initial change offers base broker backend support, a local
filesystem-based broker, a broker registry, and the beginnings of broker
configuration.A broker backend is responsible for connecting to a broker service,
allowing tasks to be sent or messages to be broadcast to all active
workers, and gathering worker status.We're using Celery for the main broker work, since that's pretty
complete, but the architecture doesn't mandate this.BaseBrokerBackend
doesn't care about the transport, whileBaseCeleryBrokerBackend
manages all the Celery state (and ties it to the instance, rather than
registering a globalCeleryinstance).Subclasses using Celery simply need to inherit from
BaseCeleryBrokerBackendand overrideget_celery_config()to return
the configuration and broker URI needed.There's currently a single built-in filesystem-based broker. It stores
messages and worker registrations in the site's data directory for local
workers to access. This is a default that will be usable with a future
version of Review Bot and with an upcoming local-only companion worker
responsible for background tasks.Future changes will implement worker scanning, more backends,
configuration, and the local background task companion worker.
Unit tests pass.
Tested the basic functionality in combination with other changes and
a modified Review Bot.
| Summary | ID |
|---|---|
| 8cea3ad0b7ef37b01547b9fc82054e2f82591cf3 |
| Description | From | Last Updated |
|---|---|---|
|
undefined name 'JSONDict' Column: 33 Error code: F821 |
|