此内容没有您所选择的语言版本。
Chapter 9. Consumer Groups page
The Consumer Groups page lists all consumer groups associated with a Kafka cluster. You can filter the list by consumer group name or status.
For each consumer group, view the 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.
Click on a consumer group name to check group members. Select the options icon (three vertical dots) against a consumer group to reset consumer offsets.
9.1. Checking consumer group members 复制链接链接已复制到粘贴板!
Check the members of a specific consumer group from the Consumer Groups page.
Procedure
- Log in to the Kafka cluster in the Streams for Apache Kafka Console, then click Consumer Groups.
- On the Consumer Groups page, click the name of the consumer group you want to inspect.
Click on the right arrow (>) next to a member ID to view 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).
9.2. Resetting consumer offsets 复制链接链接已复制到粘贴板!
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
- Log in to the Kafka cluster in the Streams for Apache Kafka Console, then click Consumer Groups.
- Click the options icon (three vertical dots) for the consumer group and click the reset consumer offsets 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 (available only if you selected a specific topic and a specific partition). If you select this option, 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.
(Optional) Perform a dry run before applying the offset reset.
- Click the down arrow next to Dry run.
Choose the option to run the dry run and view the results in the console, or copy the command to run it independently against the consumer group.
The results display the new offsets for each topic partition included in the reset operation. A download option is available for the results.
- Click Reset to perform the offset reset.