{"id":18634921,"url":"https://github.com/invadergir/kafka-streams-interactive-queries","last_synced_at":"2025-10-07T16:39:11.242Z","repository":{"id":245468693,"uuid":"114327471","full_name":"invadergir/kafka-streams-interactive-queries","owner":"invadergir","description":"Example kafka streams app to help test storage and recovery of state.","archived":false,"fork":false,"pushed_at":"2017-12-20T03:36:38.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-27T08:29:03.306Z","etag":null,"topics":["interactive-queries","kafka-streams","scala"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/invadergir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2017-12-15T04:33:07.000Z","updated_at":"2018-07-18T23:00:17.000Z","dependencies_parsed_at":"2024-06-22T08:53:59.006Z","dependency_job_id":null,"html_url":"https://github.com/invadergir/kafka-streams-interactive-queries","commit_stats":null,"previous_names":["invadergir/kafka-streams-interactive-queries"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invadergir%2Fkafka-streams-interactive-queries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invadergir%2Fkafka-streams-interactive-queries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invadergir%2Fkafka-streams-interactive-queries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invadergir%2Fkafka-streams-interactive-queries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/invadergir","download_url":"https://codeload.github.com/invadergir/kafka-streams-interactive-queries/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239433910,"owners_count":19637806,"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":["interactive-queries","kafka-streams","scala"],"created_at":"2024-11-07T05:22:29.538Z","updated_at":"2025-10-07T16:39:11.132Z","avatar_url":"https://github.com/invadergir.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"Roughly Following:\nhttps://docs.confluent.io/current/streams/developer-guide/interactive-queries.html#streams-developer-guide-interactive-queries-discovery\n\nCode example: \nhttps://github.com/confluentinc/kafka-streams-examples/tree/4.0.x/src/main/java/io/confluent/examples/streams/interactivequeries\n\n# Purpose\nYou can use this in combination with kafka-key-value-producer to locally test some availability \u0026 scalability scenarios.  Keys 'a' through 'j' are printed when you query the state store.  Spin up more than 1 instance, send it some data, and see where the keys go.  Your input topic ('input-topic') must have \u003e 1 partition.  Once you sent some data, kill one or the other instance and see what happens.  It's a valuable exercise to understand how kafka streams stores data with partitioning.\n\n\n# To create input \u0026 output topics: \nsee bin/create-topics.sh # default num topics is 2, can specify differently\n   \n# To run console producer:\nkafka-console-producer.sh --broker-list localhost:9092 --topic input-topic\n\n# To run console consumer to see output:\n## For WordCount: (when testing word counts - see Main.scala to select active stream processor)\nkafka-console-consumer.sh --bootstrap-server localhost:9092 \\\n    --topic output-topic \\\n    --from-beginning \\\n    --formatter kafka.tools.DefaultMessageFormatter \\\n    --property print.key=true \\\n    --property print.value=true \\\n    --property key.deserializer=org.apache.kafka.common.serialization.StringDeserializer \\\n    --property value.deserializer=org.apache.kafka.common.serialization.LongDeserializer    \n\n## For KVStreamProcessor: (when testing generic String-String store, see Main.scala)\nkafka-console-consumer.sh --bootstrap-server localhost:9092 \\\n    --topic output-topic \\\n    --from-beginning \\\n    --formatter kafka.tools.DefaultMessageFormatter \\\n    --property print.key=true \\\n    --property print.value=true \\\n    --property key.deserializer=org.apache.kafka.common.serialization.StringDeserializer \\\n    --property value.deserializer=org.apache.kafka.common.serialization.StringDeserializer    \n\n# To create jar file:\nsbt assembly\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvadergir%2Fkafka-streams-interactive-queries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvadergir%2Fkafka-streams-interactive-queries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvadergir%2Fkafka-streams-interactive-queries/lists"}