Skip to content

skrishnan2001/microservices-kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Microservices Kafka Cluster

This project is a microservices architecture built around Apache Kafka for event-driven communication. It consists of multiple independent services that interact via Kafka topics to provide a scalable and decoupled system.

Services Overview

  • client: A frontend application built with Next.js and React. It serves as the user interface for interacting with the system.
  • analytic-service: A Kafka service responsible for processing and analyzing event data.
  • email-service: A Kafka service that handles email-related events and notifications.
  • kafka-service: Manages Kafka cluster setup and administration.
  • order-service: Processes order-related events through Kafka.
  • payment-service: Handles payment processing with an Express API and Kafka integration.

Prerequisites

  • Node.js (version 16 or higher recommended)
  • Apache Kafka cluster running and accessible
  • npm or yarn package manager

Installation

Each service has its own dependencies. To install them, navigate to each service directory and run:

npm install

or

yarn install

Running the Project

  1. Ensure your Kafka cluster is running.
  2. Start each service individually by navigating to its directory and running:
npm run dev

or

node index.js

depending on the service setup.

  1. For the client frontend, run:
npm run dev

inside the services/client directory to start the Next.js development server.

Usage

The services communicate asynchronously via Kafka topics. The client frontend interacts with the backend services to provide a seamless user experience. Each service handles its domain-specific logic and communicates events through Kafka.

Project Structure

services/
├── analytic-service/    # Kafka analytics service
├── client/              # Frontend Next.js application
├── email-service/       # Kafka email handling service
├── kafka/               # Kafka cluster management service
├── order-service/       # Kafka order processing service
└── payment-service/     # Kafka payment processing service with Express API

Contributing

Contributions are welcome. Please open issues or submit pull requests for improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Kafka cluster setup for an ecommerce application

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published