All Products
Search
Document Center

ApsaraMQ for Kafka:View rebalance details

Last Updated:Mar 19, 2024

If a rebalance occurs on a consumer client, you can view the rebalance details, such as the start time, duration, and cause of the rebalance. You can also check the number of times that rebalances occurred and whether consumers are added to a consumer group after a rebalance.

Background information

In ApsaraMQ for Kafka, a rebalance is the process in which partitions are remapped to consumer groups. A rebalance may be triggered on a consumer client due to the following causes:

  • A consumer adds subscriptions to or removes subscriptions from a consumer group.

  • The number of partitions in a topic changes.

  • The number of consumers in a consumer group increases or decreases.

    • Slow consumption response causes consumption heartbeats to time out. To filter the consumers whose heartbeats time out, a rebalance is triggered.

    • No messages are pulled after the time specified by the max.poll.interval.ms parameter elapses. This causes the client to disconnect from the queue and triggers a rebalance. The default value of the max.poll.interval.ms parameter is 5 minutes.

    • The number of consumers in the consumer group is too large. To save topic and partition resources, specific consumers need to be shut down. This triggers a rebalance.

    • The number of consumers in the consumer group is insufficient. This causes message delays in topics and partitions. To prevent message delays, a specific number of consumers must be added. This triggers a rebalance.

Procedure

  1. Log on to the ApsaraMQ for Kafka console. In the left-side navigation pane, click Instances.

  2. In the top navigation bar, select the region where the instance that you want to manage resides. On the Instances page, click the name of the instance that you want to manage.

  3. In the left-side navigation pane, click Groups. On the page that appears, find the group that you want to manage and click the name of the group.

  4. On the Group Details page, click the Rebalance Details tab.

What to do next

For information about how to resolve the issue if rebalances frequently occur on a client, see Why do rebalances frequently occur on my consumer client?