sboot/kotlin reusable building blocks for kafka event-driven pipelines
- clustering / replication / partitioning
- Avro schema / registry
- transactional outbox publish
- idempotent transactional inbox consume
- manual CDC
- automatic CDC / outbox publish with Debezium
- backoff / retry / rescue
- dead lettering
- GraalVM
- mTLS / ACLs
can be modified using compose.yaml and .env
kafka-demo/ # parent pom
├── commons/ # shared libs/abstractions, Avro schemas/codegen, test fixtures
├── order-api/
├── inventory-service/docker compose pull && docker compose uporder-api | kafbat UI | jaeger | grafana
curl -iLX 'POST' \
'http://localhost:8080/api/order' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"customerId":"user_2203","items":[{"sku":"sku-01","quantity":10,"unitPriceCents":199}]}'oha -n 5000 -c 500 --redirect 0 \
-m POST \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"customerId":"user_2203","items":[{"sku":"sku-01","quantity":10,"unitPriceCents":199}]}' \
http://localhost:8080/api/order
# -n total request
# -c concurrent connectionexpect n to land in orders.placed and around 50% of n to land in orders.[accepted|rejected] each
pause or stop any Kafka container mid-load test, order-api | inventory-service | debezium/connect should recover
automatically after 1st timeout
nvm use && npm i && sdk env install./gradlew clean ktlintFormat ktlintCheck build jibDockerBuild -x processAot -x processTestAot
docker compose -f compose.jvm.yaml up./gradlew clean ktlintFormat ktlintCheck build -PgenerateMetadata
./gradlew buildImage
docker compose up