...
These APIs allow for centralized management of offsets. Read more Offset Management. As per comments on KAFKA-993 these API calls are not fully functional in releases until Kafka 0.8.1.1. It will be available in the 0.8.2 release.
...
Group Coordinator Request
The offsets for a given consumer group are maintained by a specific broker called the offset coordinatorgroup coordinator. i.e., a consumer needs to issue its offset commit and fetch requests to this specific broker. It can discover the current offset coordinator by issuing a consumer metadata group coordinator request.
Code Block |
---|
ConsumerMetadataRequestGroupCoordinatorRequest => ConsumerGroupGroupId ConsumerGroupGroupId => string |
...
Group Coordinator Response
Code Block |
---|
ConsumerMetadataResponseGroupCoordinatorResponse => ErrorCode CoordinatorId CoordinatorHost CoordinatorPort ErrorCode => int16 CoordinatorId => int32 CoordinatorHost => string CoordinatorPort => int32 |
...
These requests are used by clients to participate in a client group managed by Kafka. From a high level, each group in the cluster is assigned one the brokers (its group coordinator) to facilitate group management. Once the coordinator has been located (using the group coordinator request from above), group members can join the group and synchronize state, and then use heartbeats to stay active in the group. When the client shuts down, it uses a leave group request to deregister from the group. More detail on protocol semantics is outlined in Kafka Client-side Assignment Proposal.
Group Coordinator Request
The group coordinator request is used to locate the current coordinator of a group.
Code Block |
---|
GroupCoordinatorRequest => GroupId
GroupId => string |
Group Coordinator Response
...
Join Group Request
The join group request is used by a client to become a member of a group. When a member first joins the group, the memberId will be empty (i.e. ""), but if a member is rejoining the group, then it should use the same memberId from the previous generation. The details of the protocol fields are described in more detail in Kafka Client-side Assignment Proposal.
...