This project was created to be used as a PoC (Proof of Concept) to group events sent within a time window.
Kotlin Project that subscribes all topics and presents all information to understand the flow of the events.
Kotlin project with an API to receive a new customer and publish the Customer Created event.
Kotlin project that subscribe Customer Created, calculates its score and publish the Score Calculated event.
Kotlin project that subscribes to some topics to apply Kafka Streams time window, segment the customer and publish the Customer Segmented event.
-
Start all containers using Docker Compose:
docker-compose up
-
In a new terminal, build and start Client project
cd kafka-client && ./gradlew build java -jar build/libs/kafka-client-0.0.1-SNAPSHOT.jar
-
In a new terminal, build and start Customer project
cd kafka-customer && ./gradlew build java -jar build/libs/kafka-customer-0.0.1-SNAPSHOT.jar
-
In a new terminal, build and start Credit project
cd kafka-credit && ./gradlew build java -jar build/libs/kafka-credit-0.0.1-SNAPSHOT.jar
-
In a new terminal, build and start Segment project
cd kafka-segment && ./gradlew build java -jar build/libs/kafka-segment-0.0.1-SNAPSHOT.jar
-
Call Client API with a document that start with first 3 digits below 800
curl --location --request POST 'http://localhost:8091/user?username=Common&fullname=Some%20Common%20Client&document=59081024663'
-
Call Client API with a document that start with first 3 digits above 800
curl --location --request POST 'http://localhost:8091/user?username=Prime&fullname=Some%20Prime%20Customer&document=98872620562'