Skip to main content
Version: 1.0.4

Django-RMQ General

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​

  • Configuration — RABBITMQ_CONNECTIONS in settings.py; one entry per broker alias.
  • Producers — publish messages, decorator mode, persistent delivery, publisher confirms.
  • Consumers — register handlers, explicit ack/nack, exponential reconnect backoff.
  • Topology — QueueConfig, setup functions, dead-letter routing.
  • Registries — ConsumersRegistry and SetupRegistry per alias.
  • Management commands — setup_rabbitmq_topology and start_consumers.
  • Reliability — at-least-once delivery, mandatory routing, producer self-heal, DLX.
  • Multiple connections — several broker aliases with the using= parameter.
  • API Reference — full signatures and parameter docs for every public symbol.
  • Testing — unit tests with mocked Pika; integration tests against a real broker.

Installation​

Install the package:

pip install django-rmq

Add 'django_rmq' to INSTALLED_APPS and add a RABBITMQ_CONNECTIONS block to settings.py. See the Getting Started guide for the full minimal setup.

Testing​

See the Testing page for how to run the unit and integration test suites.