This is a simple and clean Python project designed to establish a connection with RabbitMQ.
It follows best practices such as separation of concerns and object-oriented design patterns.
- Uses the Singleton Pattern for managing RabbitMQ connection.
- The Producer and Consumer are implemented as separate, independent classes.
- A dedicated class handles the RabbitMQ configuration.
- Each component is modular and adheres to the SOLID principles.
- Designed with scalability and maintainability in mind.
- Make sure RabbitMQ is up and running on your machine or network.
- Install dependencies (if any).
- Import the relevant classes and start producing or consuming messages.
Example:
from connection.rabbit_connection import RabbitMQConnection
from producer.producer import MyProducer
from consumer.consumer import MyConsumer