{"id":19541340,"url":"https://github.com/wingify/kafka-streams-stateful-example","last_synced_at":"2025-10-10T10:41:24.787Z","repository":{"id":66139216,"uuid":"308044262","full_name":"wingify/kafka-streams-stateful-example","owner":"wingify","description":"Example to demonstrate aggregation in Kafka Streams ","archived":false,"fork":false,"pushed_at":"2020-11-10T11:29:38.000Z","size":507,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-01-08T18:44:47.638Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wingify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2020-10-28T14:35:06.000Z","updated_at":"2022-08-06T09:03:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"9b8a4b0c-0382-4151-947a-4fda736dc6b0","html_url":"https://github.com/wingify/kafka-streams-stateful-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fkafka-streams-stateful-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fkafka-streams-stateful-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fkafka-streams-stateful-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingify%2Fkafka-streams-stateful-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wingify","download_url":"https://codeload.github.com/wingify/kafka-streams-stateful-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240795123,"owners_count":19858748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-11T03:09:58.671Z","updated_at":"2025-09-16T04:28:44.188Z","avatar_url":"https://github.com/wingify.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kafka-streams-stateful-example\n\nThis example demonstrates aggregation in Kafka Streams with two different approaches, one based on DSL operators like `groupByKey` and `reduce`,\nand another using Kafka Streams Processor API and state stores.\n\n## Dependencies\n\n- **JAVA 8**\n- **Maven** and **Kafka** should be installed for running this project.\n\n## How To Run\n\n- Create input Kafka topic `user-activity` from Kafka root directory:\\\n\n    ``` bash\n    bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 4 --topic user-activity\n    ```\n\n- Run `mvn clean compile assembly:single`. A jar named `kafka-streams-stateful-1.0-SNAPSHOT-jar-with-dependencies.jar` will be created in `target` directory.\n\n- A data generation script is present in the `TestDataGenerator` class with which you can push Kafka messages to the input Kafka topic:\\\n\n    ```bash\n    java -cp target/kafka-streams-stateful-1.0-SNAPSHOT-jar-with-dependencies.jar TestDataGenerator {{number_of_messages}}\n    ```\n\n- To Run the Kafka Streams Application:\\\n\n    ```bash\n    java -cp target/kafka-streams-stateful-1.0-SNAPSHOT-jar-with-dependencies.jar Main\n    ```\n\n## Diagrams\n\n* **Kafka Streams Topology**\n\n    \u003cimg src=\"diagrams/kafka-streams-topology.png\" alt=\"kafka-streams-topology\"\u003e\n\n* **Kafka Streams Flow Diagram**\n\n    \u003cimg src=\"diagrams/kafka-streams-flow-diagram.png\" alt=\"kafka-streams-flow-diagram\"\u003e\n\n## Author\n\nAditya Gaur [@aditya232](https://github.com/aditya232)\n\n## Contributing\n\nPlease go through our [contributing guidelines](https://github.com/wingify/kafka-streams-stateful-example/blob/master/CONTRIBUTING.md)\n\n## Code of Conduct\n\n[Code of Conduct](https://github.com/wingify/kafka-streams-stateful-example/blob/master/CODE_OF_CONDUCT.md)\n\n## Copyright and License\n\n\u003e The MIT License (MIT)\n\u003e\n\u003e Copyright (c) 2020 Wingify Software Pvt. Ltd.\n\u003e\n\u003e Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\u003e\n\u003e The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingify%2Fkafka-streams-stateful-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwingify%2Fkafka-streams-stateful-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingify%2Fkafka-streams-stateful-example/lists"}