Here is an example README.md file that could be included with the RabbitMQ Python code:
This project shows an example implementation of various messaging best practices using RabbitMQ and Pika in Python.
The code demonstrates:
- Use of durable queues, exchanges and bindings for reliability
- Manual consumer acknowledgements to confirm delivery
- Persistent messages with correlation ids for tracing
- Dead letter queues to handle failures
- Graceful connection and channel closure
It shows a typical best practice flow:
- Declare durable exchange, queue, bindings
- Publish persistent messages to exchange
- Consume messages from queue and process
- Send acknowledgements on successful processing
- Handle failures by diverting messages to a DLQ
Requires Python and RabbitMQ server installed
To try out basic messaging:
python applying_best_practices.py
Nicholas Gulrajani