When messages are accumulated in partitions or data skew occurs due to message accumulation, you can view the subscription relationship between the Group and the topic, check the consumption details of the consumer group in each partition in the topic, and know the number of accumulated messages in each partition. This way, you can adjust your business at the earliest opportunity to prevent risks caused by message accumulation.

View the consumer groups that subscribe to a specified topic

  1. Log on to the Message Queue for Apache Kafka console. In the Resource Distribution section of the Overview page, click the name of the region where your instance is deployed.
  2. On the Instances page, click the name of the instance that you want to manage.
  3. In the left-side navigation pane, click Topics.
  4. On the Topics page, find the topic whose subscription details you want to view, click More in the Actions column, and then select Subscriptions.
    On the Subscriptions tab of the Topic Details page, all consumer groups that subscribe to the topic are displayed.Subscription relationship
  5. In the Online groups that subscribe to the topic section, find the consumer group whose consumption details you want to view, and click Consumption Details in the Actions column.

    On the Consumption Details page, the consumption details of the consumer group in each partition in the topic are displayed.

    Consumption details
    Parameter Description
    Partition ID The ID of the partition in the topic.
    Client The ID and IP address of the online consumer client that subscribes to the topic.
    Note
    • The value is in the format of <Client ID>_/<IP address>.
    • You cannot view such client information about an offline consumer.
    Maximum Offset The latest offset for the topic in the current partition.
    Consumer Offset The consumer offset for the topic in the current partition.
    Accumulated Messages The total number of accumulated messages in the current partition. The value is equal to the latest offset minus the consumer offset.
    Important This parameter is a key metric. If a large number of messages are accumulated, consumers may be blocked, or the consumption speed cannot keep up with the production speed. In this case, you must analyze the status of consumers and improve the consumption speed. For more information, see Reset consumer offsets.

View the topics to which a specified consumer group subscribes

  1. On the Instances page, click the name of the instance that you want to manage.
  2. In the left-side navigation pane, click Groups.
  3. On the Groups page, find the consumer group whose subscription details you want to view, click More in the Actions column, and then select Consumption Status.
    On the Consumption Status tab of the Group Details page, all the topics to which the consumer group subscribes and the values of the Messages Accumulated and Last Consumed At parameters for each topic are displayed.Consumption status
  4. In the Topic column, find the topic whose consumption details you want to view, and click Consumption Details in the Actions column.
    On the Consumption Details page, the consumption details of the consumer group in each partition in the topic are displayed.Consumption details