• 
      

    Add initial support for message broker backends.

    Review Request #15196 — Created July 24, 2026 and updated

    Information

    Review Board
    release-9.x

    Reviewers

    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, while BaseCeleryBrokerBackend
    manages all the Celery state (and ties it to the instance, rather than
    registering a global Celery instance).

    Subclasses using Celery simply need to inherit from
    BaseCeleryBrokerBackend and override get_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
    Add initial support for message broker backends.
    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, while `BaseCeleryBrokerBackend` manages all the Celery state (and ties it to the instance, rather than registering a global `Celery` instance). Subclasses using Celery simply need to inherit from `BaseCeleryBrokerBackend` and override `get_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.
    8cea3ad0b7ef37b01547b9fc82054e2f82591cf3
    Description From Last Updated

    undefined name 'JSONDict' Column: 33 Error code: F821

    reviewbot reviewbot
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8