Loading repository data…
Loading repository data…
rbiedrawa / repository
Account Service - Spring, Kafka Streams sample application that allows users to sign up and retrieve account details and statistics. This PoC demonstrates how to run multiple Kafka Streams instances (with different consumer groups) inside single Spring Boot application.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Account Service - Spring, Kafka Streams sample application that allows users to Sign up and retrieve account details and statistics.
This project demonstrates how to run multiple Kafka Streams instances (with different consumer groups) inside single Spring Boot application.
dummy_data_gen spring profile.Start Kafka broker and Schema Registry using Confluent Community or Confluent Platform components.
docker-compose -f ./docker/local/docker-compose.yml up -d
docker-compose -f ./docker/confluent-platform/docker-compose.yml up -d
Check if all containers started, using docker-compose ps command.
# Sample output for Confluent Platform
Name Command State Ports
----------------------------------------------------------------------------------------------------
broker /etc/confluent/docker/run Up 0.0.0.0:9092->9092/tcp, 0.0.0.0:9101->9101/tcp
control-center /etc/confluent/docker/run Up 0.0.0.0:9021->9021/tcp
rest-proxy /etc/confluent/docker/run Up 0.0.0.0:8082->8082/tcp
schema-registry /etc/confluent/docker/run Up 0.0.0.0:8081->8081/tcp
zookeeper /etc/confluent/docker/run Up 0.0.0.0:2181->2181/tcp, 2888/tcp, 3888/tcp
Start Account Service
./gradlew bootRun
Check Create Account flow
# Sample request body
{
"email": "newAccount@test.com",
"countryCode": "GB",
"type": 2
}
# Sample response body
{
"id": "519faeb7-ccdf-49dd-95a4-3e2a6ac8ad13",
"email": "newAccount@test.com",
"countryCode": "GB",
"type": "PREMIUM",
"createdDate": {
"seconds": "1616860904",
"nanos": 644947000
}
}
accounts.store state store (use account id retrieved before):
curl -X GET --location "http://localhost:8080/api/v1/accounts/519faeb7-ccdf-49dd-95a4-3e2a6ac8ad13"
curl -X GET --location "http://localhost:8080/api/v1/statistics/countries/GB/accounts"
Analise kafka streams topology:
curl -X GET --location "http://localhost:8080/topologies"
curl -X GET --location "http://localhost:8080/topologies/accounts-per-country"
Docker compose file with instructions are kept in docker subdirectory.
Distributed under the MIT License. See LICENSE for more information.