Skip to content

A simple distributed messaging queue system inspired by Kafka which uses Sofa-JRaft for consensus. (In development)

Notifications You must be signed in to change notification settings

anshmehtamm/RippleMQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RippleMQ

About

RippleMQ is a simplified version of a Distributed Messaging Queue inspired by Kafka, focusing on implementing its core functionalities. This project is developed as part of CS 7610 – Foundations of Distributed Systems @ Northeastern

Architecture

image

Modules

  1. mq-broker: Module for broker service. Deploy multiple broker services to form a cluster of RippleMQ.
  2. mq-common: Module for implementing producers and consumers, provides API for them.

How to implement producer and consumer

Add below dependency in your POM.xml

<dependency>
  <groupId>org.example</groupId>
   <artifactId>mq-common</artifactId>
  <version>1.0-SNAPSHOT</version>
</dependency>

Use below to implement producer

ProducerClient producerClient = new ProducerClientImpl(
        "client1",
        Arrays.asList("localhost:9092", "localhost:9093", "localhost:9094",
                "localhost:9095", "localhost:9096"));

producerClient.produce("topic1", "test-message");

Use below to implement consumer

 ConsumerClient consumerClient = new ConsumerClientImpl("client3",
         Arrays.asList("localhost:9092", "localhost:9093", "localhost:9094",
                 "localhost:9095", "localhost:9096"));

List<String> messages = consumerClient.consume("topic1");

Current Functionalities

  1. Cluster RAFT Service
    • Metadata Management
    • Partition Assignment
  2. Partition RAFT Service
    • Partition Replication
    • Offset Management

Setup

  1. Clone the Repository

Clone the project repository to your local machine:

git clone <repository-url>
cd RippleMQ
  1. Build the Docker Image
docker build -t mq-broker -f mq-broker/Dockerfile .
  1. Run the docker compose in the broker directory
cd mq-broker
docker compose up

Contributing

About

A simple distributed messaging queue system inspired by Kafka which uses Sofa-JRaft for consensus. (In development)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published