{"id":50352264,"url":"https://github.com/xmlking/aggregator-service","last_synced_at":"2026-05-29T21:02:39.515Z","repository":{"id":343373438,"uuid":"1177434266","full_name":"xmlking/aggregated-payments-app","owner":"xmlking","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-10T06:22:52.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-10T10:52:30.783Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmlking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-10T02:47:47.000Z","updated_at":"2026-03-10T06:22:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/xmlking/aggregated-payments-app","commit_stats":null,"previous_names":["xmlking/aggregated-payments-app"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/xmlking/aggregated-payments-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Faggregated-payments-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Faggregated-payments-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Faggregated-payments-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Faggregated-payments-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmlking","download_url":"https://codeload.github.com/xmlking/aggregated-payments-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Faggregated-payments-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33670211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-29T21:02:38.471Z","updated_at":"2026-05-29T21:02:39.479Z","avatar_url":"https://github.com/xmlking.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aggregator Service\n\n**Spring Cloud Streams** PoC\n\n## Run\n\nStart kafka\n\n```shell\n# start all - redpanda and console\ndocker compose up\n\nrpk version\nrpk cluster info\n\n# produce\nrpk topic produce topic-1 -k trans-id-1\n{ \"id\": \"trans-id-1\", \"source\": \"messge body 1\", \"metadata\": {}, \"timestamp\": \"2023-01-22 20:23:16.305\" }\n{ \"id\": \"trans-id-1\", \"source\": \"messge body 2\", \"metadata\": {}, \"timestamp\": \"2023-01-22 20:23:16.305\" }\n{ \"id\": \"trans-id-1\", \"source\": \"messge body 3\", \"metadata\": {}, \"timestamp\": \"2023-01-22 20:23:16.305\" }\n# or\necho '{ \"id\": \"trans-id-1\", \"source\": \"messge body 1\", \"metadata\": {}, \"timestamp\": \"2023-01-22 20:23:16.305\" }' | rpk topic produce topic-1 -k trans-id-1\necho '{ \"id\": \"trans-id-1\", \"source\": \"messge body 2\", \"metadata\": {}, \"timestamp\": \"2023-01-22 20:23:16.305\" }' | rpk topic produce topic-2 -k trans-id-1\necho '{ \"id\": \"trans-id-1\", \"source\": \"messge body 3\", \"metadata\": {}, \"timestamp\": \"2023-01-22 20:23:16.305\" }' | rpk topic produce topic-3 -k trans-id-1\n# consume\nrpk topic consume aggregated-topic\n```\n\nStart µService\n\n```shell\ngradle bootRun\n# log at debug level\ngradle bootRun --debug\n```\n\n## Build\n\n```shell\ngradle spotlessApply\ngradle build\n```\n\n## Test\n\n```shell\n# list all schemas \ncurl -s \\\n  \"http://localhost:8081/subjects\" \\\n  | jq .\n# get schemas for `all-in-topic-value`\ncurl -s \\\n  \"http://localhost:8081/subjects/aggregated-topic-value/versions/1\" \\\n  | jq '.schema | fromjson' \n# (or) you can see ` \"sensitive\": \"true\"` property.\ncurl -s \\\n  \"http://localhost:8081/subjects/aggregated-topic-value/versions/latest/schema\" \\\n  | jq .\n```\n\n## Lint\n\n```shell\nktlint --format\n# or\nktlint -F\n```\n## Operations\n\n### Metrics\n\n```shell\ncurlie :3000/actuator\n\ncurlie :3000/actuator/health\n\ncurlie :3000/actuator/metrics\ncurlie :3000/actuator/metrics/kafka.admin.client.request.total\n\ncurlie :3000/actuator/bindings\ncurlie :3000/actuator/bindings/ggregate-in-0\ncurlie :3000/actuator/bindings/aggregate-out-0\ncurlie :3000/actuator/bindings/uppercase-in-0\n\ncurlie :3000/actuator/kafkastreamstopology\ncurlie :3000/actuator/kafkastreamstopology/\u003capplication-id of the processor\u003e\ncurlie :3000/actuator/kafkastreamstopology/aggregator-service-aggregate\ncurlie :3000/actuator/kafkastreamstopology/aggregator-service-uppercase\n````\n\n### Binding control\n\n```shell\ncurl -d '{\"state\":\"STOPPED\"}' -H \"Content-Type: application/json\" -X POST localhost:3000/actuator/bindings/aggregate-in-0\ncurlie :3000/actuator/bindings/aggregate-in-0\ncurl -d '{\"state\":\"STARTED\"}' -H \"Content-Type: application/json\" -X POST localhost:3000/actuator/bindings/aggregate-in-0\ncurl -d '{\"state\":\"PAUSED\"}'  -H \"Content-Type: application/json\" -X POST localhost:3000/actuator/bindings/aggregate-in-0\ncurl -d '{\"state\":\"RESUMED\"}' -H \"Content-Type: application/json\" -X POST localhost:3000/actuator/bindings/aggregate-in-0\n```\n\n### Binders\nwe need add `kafka` binder for `Supplier` functions to work\nWe can only use `Consumer` and `Function` functions with `KStream` binder.\n\n```gradle\nimplementation(\"org.springframework.cloud:spring-cloud-stream-binder-kafka\")\nimplementation(\"org.springframework.cloud:spring-cloud-stream-binder-kafka-streams\")\n ```\n\n## Maintenance\n\nUpdate Gradle wrapper \n```shell\n./gradlew wrapper --gradle-version 9.4.0  --distribution-type all\n```\n\nshow outdated dependencies\n```shell\ngradle dependencyUpdates -Drevision=release\n```\n\n## Reference\n- [Fictional Spring Cloud Streams](https://github.com/spring-cloud/spring-cloud-stream/blob/main/docs/src/main/asciidoc/spring-cloud-stream.adoc#functions-with-multiple-input-and-output-arguments)\n- [Introducing Java Functions for Spring Cloud Stream Applications - Part 0](https://spring.io/blog/2020/07/13/introducing-java-functions-for-spring-cloud-stream-applications-part-0)\n- [spring-cloud-stream-binder-kafka Docs](https://cloud.spring.io/spring-cloud-static/spring-cloud-stream-binder-kafka/)\n- [No need for Schema Registry in your Spring-Kafka tests](https://medium.com/@igorvlahek1/no-need-for-schema-registry-in-your-spring-kafka-tests-a5b81468a0e1)\n### Example projects\n- https://github.com/spring-cloud/spring-cloud-stream-samples/\n- https://github.com/spring-cloud/spring-cloud-stream-samples/tree/main/kafka-streams-samples\n- InteractiveQueryService https://github.com/piomin/sample-spring-cloud-stream-kafka/blob/master/stock-service/src/main/java/pl/piomin/samples/kafka/stock/controller/TransactionController.java\n- https://github.com/spring-cloud/spring-cloud-stream-samples/blob/main/kafka-streams-samples/kafka-streams-inventory-count/src/main/java/kafka/streams/inventory/count/KafkaStreamsInventoryCountApplication.java\n- https://github.com/ru-rocker/kafka-stream-employee-example\n- [Distributed Transactions in Microservices with SAGA, Kafka Streams and Spring Boot ](https://github.com/piomin/sample-spring-kafka-microservices)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Faggregator-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmlking%2Faggregator-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Faggregator-service/lists"}