...
This means we are creating 4 new instance ids compared with previous round, so broker could no longer leverage the static information it stored. Basically, the scenario invalidates static membership effectiveness.
Another example would be: if a user `closes()` a `KafkaStreams` client and creates a new one (for example to recover failed threads), while the JVM is still running, it is more intuitive that the thread names are number from 1 to X again, and not from X+1 to 2*x on restart.
Proposed Changes
Each stream instance will use local counter to create stream thread name. So the above example will be always generating instance ids as: A-1, A-2, B-1, B-2. By persisting instance ids generation, the static membership will still behave as expected when we configure > 1 stream instances in one JVM.
...