Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.8 KB

File metadata and controls

41 lines (29 loc) · 1.8 KB

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.