Skip to content

nsteps/kafka-streams-store-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kafka streams based store

The implementation of microservice architecture using kafka as event-store. Most of the business logic implemented by Kafka Streams stateful operations. All components communicate via events in kafka topics.

Order service provides a REST API for creating and getting orders with CQRS style. It has local kafka-streams based local store and two type or get queries: get current order state by id and long-pooling get order, which will wait until order will be validated by other services.

Orders are validated in parallel by 3 validation services: Fraud, Order details and Warehouse services. After validation has been completed Validations-aggregatos-service aggregate the result and decide if order pass or not validation.

Architecture

Architecture is described in the great book - Designing event-driven systems by Ben Stopford

System Architecture: alt text image source

Services

  • order-service
  • fraud-service
  • order-details-service
  • order-validations-aggregate-service
  • order-history-service
  • warehouse-service

How to run

For local development run LocalRunner which will start kafka and kafka ui via testcontainers.

To simulate store customers run ClientSimulation

About

Store based on kafka streams and event-driven style

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages