Skip to content

Concrete event- and domain-driven order fulfilment implementation using Kafka or Rabbit as Event Bus and Java, Spring Boot & Camunda for the microservices

License

Notifications You must be signed in to change notification settings

th0ngbui/flowing-retail

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample microservices implementing order fulfillment

This sample application shows how to implement

  • a simple order fulfillment system

in the context of

  • Domain Driven Design (DDD)
  • Event Driven Architecture (EDA)
  • Microservices (µS)

with the concrete technologies/frameworks:

  • Java
  • Spring Boot
  • Spring Cloud Streams
  • Camunda
  • Kafka

Links

Overview and architecture

Flowing retail simulates a very easy order fulfillment system. The business logic is separated into the following microservices:

Microservices

  • The core domains communicate via messages with each other.
  • Messages might contain events or commands.

Note that every component does its own parts of the overall order fulfillment capability. As an example this is illustrated using BPMN and showing the Order and Payment Service with their processes:

Events and Commands

Run the application

  • Download or clone the source code
  • Run a full maven build
mvn install
  • Install and start Kafka on the standard port
  • Create topic "flowing-retail" (TODO: Auto Creation by Spring)
kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic flowing-retail
  • You can check & query all topics by:
kafka-topics.sh --list --zookeeper localhost:2181
  • Start the different microservices components by Spring Boot one by one
mvn -f checkout exec:java
...

You can also import the projects into your favorite IDE and start the following class yourself:

checkout/io.flowing.retail.java.CheckoutApplication
...

About

Concrete event- and domain-driven order fulfilment implementation using Kafka or Rabbit as Event Bus and Java, Spring Boot & Camunda for the microservices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 87.0%
  • HTML 8.3%
  • JavaScript 4.7%