Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 8. Consumer Groups page
The Consumer Groups page shows all the consumer groups associated with a Kafka cluster. For each consumer group, you can see its status, the overall consumer lag across all partitions, and the number of members. Click on associated topics to show the topic information available from the Topics page tabs.
Consumer group status can be one of the following:
- Stable indicates normal functioning
- Rebalancing indicates ongoing adjustments to the consumer group’s members.
- Empty suggests no active members. If in the empty state, consider adding members to the group.
Check group members by clicking on a consumer group name. Select the options icon (three vertical dots) against a consumer group to reset consumer offsets.
8.1. Checking consumer group members Copier lienLien copié sur presse-papiers!
Check the members of a specific consumer group from the Consumer Groups page.
Procedure
- From the Streams for Apache Kafka Console, log in to the Kafka cluster, then click Consumer Groups.
- Click the name of the consumer group you want to check from the Consumer Groups page.
- Click on the right arrow (>) next to a member ID to see the topic partitions a member is associated with, as well as any possible consumer lag.
For each group member, you see the unique (consumer) client ID assigned to the consumer within the consumer group, overall consumer lag, and the number of assigned partitions.
Any consumer lag for a specific topic partition reflects the gap between the last message a consumer has picked up (committed offset position) and the latest message written by the producer (end offset position).
8.2. Resetting consumer offsets Copier lienLien copié sur presse-papiers!
Reset the consumer offsets of a specific consumer group from the Consumer Groups page.
You might want to do this when reprocessing old data, skipping unwanted messages, or recovering from downtime.
Prerequisites
All active members of the consumer group must be shut down before resetting the consumer offsets.
Procedure
- From the Streams for Apache Kafka Console, log in to the Kafka cluster, then click Consumer Groups.
- Click the options icon (three vertical dots) for the consumer group and click the reset consumer offset option to display the Reset consumer offset page.
Choose to apply the offset reset to all consumer topics associated with the consumer group or select a specific topic.
If you selected a topic, choose to apply the offset reset to all partitions or select a specific partition.
Choose the position to reset the offset:
-
Custom offset
If you selected custom offset, enter the custom offset value. - Latest offset
- Earliest offset
-
Specific date and time
If you selected date and time, choose the appropriate format and enter the date in that format.
-
Custom offset
- Click Reset to perform the offset reset.
Performing a dry run
Before actually executing the offset reset, you can use the dry run option to see which offsets would be reset before applying the change.
- From the Reset consumer offset page, click the down arrow next to Dry run.
-
Choose the option to run and show the results in the console.
Or you can copy the dry run command and run it independently against the consumer group.
The results in the console show the new offsets for each topic partition included in the reset operation.
A download option is available for the results.