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
- mq-broker: Module for broker service. Deploy multiple broker services to form a cluster of RippleMQ.
- mq-common: Module for implementing producers and consumers, provides API for them.
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");
- Cluster RAFT Service
- Metadata Management
- Partition Assignment
- Partition RAFT Service
- Partition Replication
- Offset Management
- Clone the Repository
Clone the project repository to your local machine:
git clone <repository-url>
cd RippleMQ
- Build the Docker Image
docker build -t mq-broker -f mq-broker/Dockerfile .
- Run the docker compose in the broker directory
cd mq-broker
docker compose up