Help Center/ Distributed Message Service for Kafka/ User Guide (Paris Region)/ FAQs/ Messages/ How Do I View the Number of Accumulated Messages?
Updated on 2024-04-07 GMT+08:00

How Do I View the Number of Accumulated Messages?

View the number of accumulated messages using any of the following methods:

  • On the Consumer Groups page of an instance, click the name of the consumer group whose accumulated messages are to be viewed. The consumer group details page is displayed. On the Consumer Offset tab page, view the number of messages accumulated in each topic of your target consumer group. For details, see Querying Consumer Group Details.
  • On the Monitoring tab page of an instance, click the By Consumer Group tab. Select the desired consumer group for Consumer Group and All queues for Queue. The Consumer Available Messages metric reflects the number of messages accumulated in all topics of this consumer group. For details about viewing the monitoring data, see Viewing Metrics.
  • On the Consumer Groups tab page of the Cloud Eye console, click the By Consumer Group tab. Select the desired consumer group for Consumer Group and All queues for Queue. The Consumer Available Messages metric reflects the number of messages accumulated in all topics of this consumer group. For details about viewing the monitoring data, see Viewing Metrics.
  • On the Kafka client, run the kafka-consumer-groups.sh --bootstrap-server {Kafka connection address} --describe --group {Consumer group} command in the /{directory where the CLI is located}/kafka_{version}/bin/ directory to view the number of messages accumulated in each topic of the consumer group. LAG indicates the total number of messages accumulated in each topic.
    Figure 1 Viewing the total number of messages accumulated in each topic

    If SASL authentication is enabled for the Kafka instance, the --command-config {SASL authentication configuration file consumer.properties} parameter must be added to the preceding command. For details about the configuration file consumer.properties, see the CLI access instructions provided in Accessing a Kafka Instance with SASL.