Consumer Group Protocol (KIP-848)
KIP-848 is the next generation of Kafka's consumer group protocol. WarpStream has full support for this protocol including migration of groups on the older protocol to the newer protocol.
Configuration
Broker configs
group.consumer.session.timeout.ms
45000
How long a member can go without heartbeating before it's removed from the group.
group.consumer.heartbeat.interval.ms
5000
How often members send heartbeats.
group.consumer.max.size
32000
Maximum number of members in a group.
group.consumer.migration.policy
bidirectional
Whether a group with active members can switch protocols. See Migration policy.
These can be altered using the alter config or incremental alter config kafka apis.
Group configs
You can override the session timeout and heartbeat interval for an individual group with consumer.session.timeout.ms and consumer.heartbeat.interval.ms consumer group configs using the incremental alter configs kafka api.
Migrating from the older classic protocol
Migrated consumers will resume from the last committed offset for a partition.
1. Upgrade your clients
Upgrade to a client version that supports KIP-848. Opting in is a client-side setting: for the Java client and librdkafka, set group.protocol=consumer. See Client migration guides for each client's minimum version and instructions.
2. Update your consumer configuration
Remove settings that only apply to the classic protocol: session.timeout.ms, heartbeat.interval.ms, and partition.assignment.strategy. Some clients, including the Java client, refuse to start if they're set together with group.protocol=consumer. Use the cluster-wide or per-group settings in Configuration instead.
3. Rolling restart your consumers
Rolling migration. The first client which connects with WarpStream on the new protocol will cause the group to automatically convert to the modern protocol. Existing members still heartbeating on the old protocol are supported. As all clients finish rotating, all members of the group will be on the new protocol. This requires the migration policy to be upgrade or bidirectional.
WarpStream won't convert a group that still has classic members if any of the following are true:
The migration policy doesn't allow upgrades.
The group uses a custom assignor which isn't supported in the old protocol.
Migration policy
group.consumer.migration.policy controls whether a group with active members can switch protocols. Empty groups can always switch.
disabled
Offline only
Offline only
upgrade
Offline or rolling
Offline only
downgrade
Offline only
Offline or rolling
bidirectional
Offline or rolling
Offline or rolling
The default is bidirectional.
Rolling back
To roll back, switch clients back to the classic protocol, for example with group.protocol=classic. The group will only roll back once every member on the newer protocol has left the group.
Client migration guides
Each client library documents its own KIP-848 migration steps. This table covers the clients in Tuning for Performance.
confluent-kafka-javascript
1.6.0 and later
Follow the librdkafka guide. Set group.protocol outside the kafkaJS config block.
Segment kafka-go
Not supported
None
Kafka Connect
Not supported. Connect workers use their own group protocol.
None
See also
Last updated
Was this helpful?