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

View consumer groups that subscribe to a topic

  1. Log on to the Message Queue for Apache Kafka console.
  2. In the Resource Distribution section of the Overview page, select the region where your instance resides.
  3. On the Instances page, click the name of the instance that you want to manage.
  4. In the left-side navigation pane, click Topics.
  5. On the Topics page, find the topic whose subscription 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
  6. 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 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.
    Notice This is a key metric. If a large number of messages are accumulated, the consumer may be blocked or the consumption speed cannot keep up with the production speed. In this case, you need to analyze the status of the consumer and improve the consumption speed. For more information, see Reset consumer offsets.

View topics to which a consumer group subscribes

  1. Log on to the Message Queue for Apache Kafka console.
  2. In the Resource Distribution section of the Overview page, select the region where your instance resides.
  3. On the Instances page, click the name of the instance that you want to manage.
  4. In the left-side navigation pane, click Groups.
  5. On the Groups page, find the consumer group whose subscription 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 details
  6. 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