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 status of 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 appear. Subscription
  6. In the Online groups that subscribe to the topic column, find the consumer group whose consumption status you want to view, and click Consumption Details in the Actions column.

    On the Consumption Details page, the consumption details of each partition of the topic appear.

    Consumption details
    Parameter Description
    Partition ID The ID of the partition of the topic.
    Client The ID and IP address of the online consumer that has subscribed to the topic appear in real time.
    Note
    • The value format is <Client ID>_/<IP address>.
    • You cannot view the client information about an offline consumer.
    Maximum Offset The maximum message consumer offset of the topic in the current partition.
    Consumer Offset The message consumer offset of the topic in the current partition.
    Accumulated Messages The total number of accumulated messages in the current partition. The value is equal to the maximum offset minus the consumer offset.
    Notice Messages Accumulated 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 operational status of the consumer and improve the consumption speed. For more information, see Reset consumer offsets.
    Last Consumed At The time when the last message consumed by the consumer group was sent to the broker for storage.

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 has subscribed and the values of Messages Accumulated and Last Consumed At of each topic appear. Consumption status
  6. In the Topic column, find the topic whose consumption status 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 of the corresponding topic appear. Consumption details