Skip to content

This project showcases a fundamental Kafka architecture implemented with a producer and consumer in a microservices environment. It serves as a foundation for leveraging Kafka in event-driven communication.

Notifications You must be signed in to change notification settings

kay-verma/Microservice-Messaging-with-Kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microservice Messaging with Kafka

This project showcases a fundamental Kafka architecture implemented with a producer and consumer in a microservices environment. It serves as a foundation for leveraging Kafka in event-driven communication.

Key Features:

  • Docker Compose: Easily spin up a local Kafka and Zookeeper cluster.
  • Producer (ApiGateway): Publishes messages to a topic ("transaction-topic").
  • Consumer (ApiConsumer): Listens for messages and logs them.

Benefits:

  • Decoupled Microservices: Services communicate asynchronously through events, enhancing independence and scalability.
  • Scalability: Kafka efficiently handles high volumes of messages.
  • Fault Tolerance: Messages are persisted, ensuring delivery even if services are unavailable.

Getting Started:

  1. Clone the repository:

    git clone https://github.com/kay-verma/Microservice-Messaging-with-Kafka.git
  2. Build and run Docker containers:

    docker-compose up -d
  3. Postman screenshot: postman

  4. Run the producer (ApiGateway): gateway

  5. Run the consumer (ApiConsumer): consumer

Further Development:

  • Extend the consumer to perform actions based on message content (e.g., send emails, update databases).
  • Implement complex workflows by chaining messages to other topics.
  • Integrate with your existing microservices to enable event-driven communication.

About

This project showcases a fundamental Kafka architecture implemented with a producer and consumer in a microservices environment. It serves as a foundation for leveraging Kafka in event-driven communication.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages