THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
// Metadata v2 Metadata => VersionNumber ClientId PreviosAssignedTasksPreviousAssignedTasks StandbyTasks UserEndpoint VersionNumber => int32 ClientId => int64 int64 // UUID most signification bits + least significant bits PreviosAssignedTasksPreviousAssignedTasks => numTasks [TaskId] StandbyTasks => numTasks [TaskId] UserEndpoint => int32 String // string length + string numTasks => int32 TaskId => GroupId Partition GroupId => int32 Partition => 32int32 // Metadata v3 // ProduceRequest v3 ProduceRequestMetadata => TransactionalId VersionNumber SupportedVersionNumber ClientId PreviousAssignedTasks StandbyTasks UserEndpoint VersionNumber RequiredAcks=> int32 SupportedVersionNumber => int32 // TimeoutNEW ClientId => int64 int64 PreviousAssignedTasks => [TopicName [Partition MessageSetSize MessageSet]] TransactionalId => nullableString RequiredAcks => int16 Timeout => int32 Partition => int32 MessageSetSize => int32 MessageSet => bytes |
...
numTasks [TaskId]
StandbyTasks => numTasks [TaskId]
UserEndpoint => string
|
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
...