Skip to content

Simple Reactive Kafka app by using awesome: reactor-kafka, spring-webflux and spring-boot!

License

Notifications You must be signed in to change notification settings

daggerok/reactive-kafka

Repository files navigation

reactive-kafka

Simple Reactive Kafka app by using awesome: reactor-kafka, spring-webflux and spring-boot!

drawing drawing

Flow

  HTTP POST via console / browser http client -->
    --> Produce kafka command via WebFLux REST API -->
      --> Process Command into Event via CommandProcessor -->  
        --> Handle event inside EventProcessor -->  
          --> Add event to EventStore

Build, run and test

start kafka and app

./gradlew kStart
./gradlew bootRun

test in a parallel in a terminal

http :8080/help

http :8080 payload=hello
http :8080 payload=how\ are\ u\?
http :8080 payload='{"data":"nice!"}'

http :8080
http :8080/find/1

shutdown and cleanup

./gradlew kStop
./gradlew kCleanData
./gradlew --stop

resources: