Django RabbitMQ Wrappers & Tools over Pika
Production ready
Django-RMQ is designed for Django projects that need predictable RabbitMQ integration in real applications.
Django native
Keep RabbitMQ connection settings and messaging code close to your Django project configuration.
Easily extensible
Build producers and consumers around small wrappers instead of spreading Pika boilerplate across the codebase.
Strongly typed
Django-RMQ ships typing support, so editors and type checkers can help while you work with messaging code.
What is Django-RMQ in a nutshell
Django-RMQ provides RabbitMQ wrappers and tools for Django projects using Pika.
It is not a full task queue or a Celery replacement. It is a lightweight integration layer for projects that want to publish messages, consume messages, and keep RabbitMQ infrastructure code tidy inside a Django application.
Feature overview
- —
RABBITMQ_CONNECTIONSinsettings.py; one entry per broker alias. - — publish messages, decorator mode, persistent delivery, publisher confirms.
- — register handlers, explicit ack/nack, exponential reconnect backoff.
- —
QueueConfig, setup functions, dead-letter routing. - —
ConsumersRegistryandSetupRegistryper alias. - —
setup_rabbitmq_topologyandstart_consumers. - — at-least-once delivery, mandatory routing, producer self-heal, DLX.
- — several broker aliases with the
using=parameter. - — full signatures and parameter docs for every public symbol.
- — unit tests with mocked Pika; integration tests against a real broker.
Installation
Install the package:
pip install django-rmqAdd 'django_rmq' to INSTALLED_APPS and add a RABBITMQ_CONNECTIONS block to settings.py. See the guide for the full minimal setup.
Testing
See the page for how to run the unit and integration test suites.