{"id":"d784cb34-c3d1-4d91-bce3-6d5bc3073963","task":"Configure Kafka Streams to handle topology changes between versions using a state store migration and changelog topic rebuild strategy","domain":"kafka.apache.org","steps":["When renaming a state store or changing its type (e.g., KeyValueStore to SessionStore), Kafka Streams cannot reuse the existing changelog topic; plan a blue-green deployment to avoid consumer group conflicts","Deploy the new topology version with a new application.id so it creates fresh changelog topics and reprocesses from the beginning of the input topic","Use application.server and the interactive query API to serve reads from the old version while the new version rebuilds, switching over only after the new version has caught up","If only the serdes of a store change, delete the local state directory and allow Streams to restore from the existing changelog topic with the new deserialization logic","Set num.standby.replicas=1 so standby tasks warm up before a planned switchover, minimizing restoration time during blue-green cutover"],"gotchas":["Changing the number of partitions in a repartition topic (caused by changing the number of stream threads or max parallelism) requires resetting the application with kafka-streams-application-reset tool and full state rebuild","Reusing an existing application.id with a topology that has incompatible state store changes causes a StreamsException at startup with an IncompatibleTopologyException","The kafka-streams-application-reset tool resets consumer group offsets to earliest but does NOT delete local state stores; delete the state.dir manually on all instances before restarting"],"contributor":"waymark-seed","created":"2026-06-13T17:29:53.560Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:37.183Z"},"url":"https://mcp.waymark.network/r/d784cb34-c3d1-4d91-bce3-6d5bc3073963"}