Skip to main content

RabbitMQ based microservice messaging framework

Project description

RabbitMQ Messaging Application

Overview

The RabbitMQ Messaging Application is a scalable and fault-tolerant messaging system that demonstrates asynchronous communication between distributed components using a message broker architecture.

This project implements producer-consumer messaging patterns using RabbitMQ, enabling reliable, decoupled, and high-performance data exchange between services.


Key Features

  • Asynchronous message publishing (Producer)
  • Reliable message consumption (Consumer)
  • Queue-based messaging using RabbitMQ (AMQP protocol)
  • Guaranteed message delivery with acknowledgments
  • Scalable architecture for distributed systems
  • Robust error handling and logging mechanisms
  • Easily extensible for microservices integration

Technology Stack

  • Message Broker: RabbitMQ
  • Protocol: AMQP 0-9-1
  • Programming Language: Java / Python / Node.js / .NET (as applicable)
  • Frameworks: (Spring Boot / Express / Flask / .NET Core) (if applicable)
  • Build Tools: Maven / npm / pip
  • Logging: Built-in logging framework / Log4j / Winston / etc.

Prerequisites

Before running this project, ensure the following are installed:

  • RabbitMQ Server
  • Erlang (dependency for RabbitMQ)
  • Language runtime (JDK / Python / Node.js / .NET SDK)
  • Package manager (Maven / npm / pip)

Installation & Setup

1. Clone the Repository

git clone:https://github.com/vigneshAnnadurai01/rabbitmq-lite.git
cd rabbitmq-lite

# ๐Ÿ“ฉ RabbitMQ Multi-Agent Messaging System

A Python-based message-driven system using RabbitMQ where a single publisher sends messages to multiple queues and different agents process them concurrently.

## ๐Ÿ›  Installation & Setup
1๏ธโƒฃ Prerequisites
Install Python

Make sure Python 3.10+ is installed

python --version
Install RabbitMQ
Windows Setup
Install Erlang
https://www.erlang.org/downloads
Install RabbitMQ Server
https://www.rabbitmq.com/download.html
Enable management plugin:
rabbitmq-plugins enable rabbitmq_management
Start RabbitMQ:
rabbitmq-server

๐Ÿ‘‰ Dashboard:

http://localhost:15672
Username: guest
Password: guest
Ubuntu/Linux
sudo apt update
sudo apt install rabbitmq-server -y
sudo systemctl start rabbitmq-server
sudo systemctl enable rabbitmq-server
2๏ธโƒฃ Project Setup
Clone / Navigate project
cd F:\rabbit\src\rabbitmq_lite
Create Virtual Environment
python -m venv venv
venv\Scripts\activate   # Windows
Install dependencies
pip install pika
## ๐Ÿ“Œ Project Architecture
main.py (Publisher)
        โ†“
RabbitMQ Queues
        โ†“
aggregator.py (Consumer Manager)
        โ†“
Agents:
   โ”œโ”€โ”€ AccountAgent
   โ”œโ”€โ”€ BillingAgent
   โ”œโ”€โ”€ DocumentAgent
   โ””โ”€โ”€ SupportAgent
##  How to Run (IMPORTANT)
 STEP 1: Start RabbitMQ Server
rabbitmq-server
 STEP 2: Start Consumers

Open new terminal:

python aggregator.py

๐Ÿ‘‰ You should see:

๐Ÿ“Œ Listening on account_queue
๐Ÿ“Œ Listening on billing_queue
๐Ÿ“Œ Listening on document_queue
๐Ÿ“Œ Listening on support_queue
 STEP 3: Send Messages (Publisher)

Open another terminal:

python main.py
## ๐Ÿ“ค Message Flow
main.py sends payload
        โ†“
4 queues receive message
        โ†“
Each Agent processes independently
## ๐Ÿงพ Sample Payload
{
    "user_id": 1000,
    "name": "Vignesh",
    "amount": 500,
    "doc_id": "DOC001",
    "ticket_id": "TKT001"
}
##  Agents Responsibilities
AccountAgent โ†’ User/account processing
BillingAgent โ†’ Payment & billing logic
DocumentAgent โ†’ Document handling
SupportAgent โ†’ Ticket management
## ๐Ÿ“Œ Expected Output
aggregator.py
๐Ÿ“Œ Listening on account_queue
๐Ÿ“Œ Listening on billing_queue
๐Ÿ“Œ Listening on document_queue
๐Ÿ“Œ Listening on support_queue
main.py
Message sent to all queues
## โš ๏ธ Common Issues
โŒ RabbitMQ not connecting

โœ” Ensure server is running:

rabbitmq-server
โŒ No message received

โœ” aggregator.py must be running before main.py

โŒ Queue not found

โœ” Run publisher once โ†’ queues auto-create

## ๐Ÿ”ฅ Run Order (VERY IMPORTANT)
1. Start RabbitMQ Server
2. Run aggregator.py
3. Run main.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rabbitmq_lite-0.1.4.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rabbitmq_lite-0.1.4-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file rabbitmq_lite-0.1.4.tar.gz.

File metadata

  • Download URL: rabbitmq_lite-0.1.4.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rabbitmq_lite-0.1.4.tar.gz
Algorithm Hash digest
SHA256 e2a14a97876ffd8bc0c5ac24fb0579aba4c7e728a72faa2b8cd43fb6f5e25db2
MD5 8ba641777b29941d68406400f82b5870
BLAKE2b-256 c19186e91f9f656955f0d8ff8d60b51dd91f9336c47f6db7e1e45e1219c64479

See more details on using hashes here.

Provenance

The following attestation bundles were made for rabbitmq_lite-0.1.4.tar.gz:

Publisher: publish.yml on vigneshAnnadurai01/rabbitmq-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rabbitmq_lite-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: rabbitmq_lite-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rabbitmq_lite-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b32afbabf956cab9c2fe5777ca2f37b511578af76443336442e8b749a8da16b4
MD5 d80b278b76bcf96992fa7adb9acc7778
BLAKE2b-256 75b7ad5f72dd7f5799f0ee0c3ee002bad5c63ffbcf114f543479535ea395dcd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for rabbitmq_lite-0.1.4-py3-none-any.whl:

Publisher: publish.yml on vigneshAnnadurai01/rabbitmq-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page