THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Note, that the currently used rebalance metadata version are 1 (0.10.0.x) and 2 (0.10.1.x, ..., 1.1.x). We increase the metadata version numer number to 3 in 1.2 release.
Code Block | ||
---|---|---|
| ||
// Metadata v2
Metadata => VersionNumber ClientId PreviosAssignedTasks StandbyTasks UserEndpoint
VersionNumber => int32
ClientId => int64 int64 // UUID most signification bits + least significant bits
PreviosAssignedTasks => numTasks [TaskId]
StandbyTasks => numTasks [TaskId]
UserEndpoint => int32 String // string length + string
numTasks => int32
TaskId => GroupId Partition
GroupId => int32
Partition => 32
// Metadata v3
// ProduceRequest v3
ProduceRequest => TransactionalId
RequiredAcks
Timeout
[TopicName [Partition MessageSetSize MessageSet]]
TransactionalId => nullableString
RequiredAcks => int16
Timeout => int32
Partition => int32
MessageSetSize => int32
MessageSet => bytes |
Upgrading to 1.2:
- prepare a jar hot swap from old version to 1.2; Kafka Streams need to be configured with
upgrade.from="<old.version>"
for startup - do a rolling bounce to get the new jar and config in place for each instance
- config
"upgrade.from"
tells the application to sendSubscription
using old endocing (version 1 or 2), to be compatible with potential version 1 or 2 leader in the group - instances will receive a corresponding version 1 or 2
Assigment
in this stage
- config
- user prepares a second round of rebalance; this time, the configuration parameter
upgrade.from
must be removed for new startup - do a second rolling bounce for each instance to get new config (ie,
upgrade.from
removed)- bounced instance can send a version 3
Subscription
as we know that leader understands version 3 - the leader sends version 1 or 2
Assigment
back as long as at least one version 1 or 2Subsription
is received - if the leader receives only version 3
Subscirption,
it send version 3Assigment
and the upgrad is completed
- bounced instance can send a version 3
...