How yayyz/kafka-msa-example works
Project type and purpose
• This is a microservice-based, event-driven sample built with Spring Cloud and Kafka.
• Purpose: simulate an order→payment→notification workflow via Kafka events, with service discovery (Eureka), an API gateway, and each service using Spring JPA/H2 for persistence.
File structure
• Top-level modules:
• eureka-server: Spring Cloud Eureka registry
• gateway: Spring Cloud Gateway for routing/external access
• order, payment, notification: three business microservices
• Each business module follows a layered structure (domain, application/service, infrastructure [messaging + persistence], presentation/controller).
• A docker-compose.yml at root likely brings up Kafka (brokers + ZooKeeper), Kafka UI, Zipkin, Eureka, etc.
• Kafka clients and serializers present in each service (“EventSerializer.java”).
• application.yml in each module configures connection to Eureka, Kafka, H2, Zipkin.
README for additional insights
• It explicitly calls out the order→payment→notification event flow.
• Tech stack: Spring-Kafka, Kafka+ZooKeeper, Kafka-UI, Zipkin, Spring Cloud Discovery (client/server), Gateway, Spring JPA, H2.
Elements
• Business services (Order, Payment, Notification) in another
• Kafka ecosystem (Broker, ZooKeeper, topics) in a third
• Observability (Zipkin, Kafka-UI) in a fourth