Message Queue for Apache RocketMQ provides the statistics feature for you to collect and monitor data that is generated on your instance during message delivery and subscription in an all-in-one, comprehensive, and multidimensional manner. This helps you obtain the status of your business at the earliest opportunity. You can use the statistics feature to troubleshoot issues based on abnormal data. This reduces O&M costs and improves maintenance efficiency. This topic describes the statistics feature, how to use the feature, and the scenarios for which the feature is suitable.

Core features

  • Multidimensional and multi-stage statistics

    On the Statistics tab, you can view message overview data at the following granularities: instance, topic, and group. The overview data includes producer overview data that is generated during the message production stage and consumer overview data that is generated during the message consumption stage. You can view overall data to monitor your instance status. You can also monitor the producer or consumer data that is generated during the message production or consumption stage based on your business requirements.

  • Display of top message data entries

    Message Queue for Apache RocketMQ allows you to collect statistics about produced messages in all topics and statistics about consumed messages in all groups for your instance. By default, the top five data entries are displayed for each query in descending order. This helps you obtain hot business data, identify high-risk topics and groups, and improve inspection efficiency.

  • Simultaneous tracking for message metrics

    On the Statistics tab, you can view trends of the produced messages in a specified topic and the consumed messages in a specified group at the same time. This helps you identify the association between and impacts on metrics. You can check message delivery and subscription status based on trend changes between metrics.

    The following figure is used as an example to illustrate how to check the message status based on these trend changes. The groups GID_consumer1 and GID_consumer2 subscribe to the topic producer1. The message consumption trend of the group GID_consumer1 is consistent with the message production trend of the topic producer1. However, the message consumption trend of the group GID_consumer2 becomes inconsistent with that of the topic producer1 at the P point. You can identify that messages are consumed in the group GID_consumer1 and messages have failed to be consumed in the group GID_consumer2. You can also narrow down the time range based on the P point to troubleshoot issues. Trend association

Scenarios

  • Troubleshooting

    The Message Queue for Apache RocketMQ console displays all groups whose messages are accumulated and the number of accumulated messages in a specified instance. If an error occurs, first check whether messages are accumulated. On the Statistics tab, you can view the accumulated messages in all groups. You do not need to go to the details page of each group. This saves time and improves efficiency when you troubleshoot issues in abnormal groups.

  • Data inspection

    On the Statistics tab, you can view the overview data that is generated during message delivery and subscription for the specified instance. You can also view the data of produced messages in all topics and consumed messages in all groups of the instance. You can evaluate instance status and impacts on your business based on message trends or errors in query results. You can also monitor overall data from multiple dimensions and identify errors in metrics. This greatly improves inspection efficiency.

Metrics

On the Statistics tab, Message Queue for Apache RocketMQ allows you to view the message overview of the specified instance, producer overview, and consumer overview. The details of each metric are described in the table that is provided in the Table 1 section.
Notice Message Queue for Apache RocketMQ collects data of each metric every minute. You can query message data that is generated within the last 15 days. The maximum time range for a query is 24 hours.
Health dashboard
Table 1. Statistical metrics
Dimension Metric Description
Message overview of an instance Produced Messages The total number of produced messages in all topics in the specified instance within the specified time range.
Average Production TPS The average transactions per second (TPS) for message production of all topics in the specified instance within the specified time range. Unit: count/s.
Average Message Size The average data size of produced messages in all topics in the specified instance within the specified time range. Unit: byte.
Consumed Messages The total number of consumed messages in all groups in the specified instance within the specified time range.
Consumption TPS The average TPS for message consumption of all groups in the specified instance within the specified time range. Unit: count/s.
Producer Overview Produced Messages The total, maximum, and minimum numbers of produced messages in each topic in the specified instance within the specified time range. In the query result, data is displayed in descending order based on the total number of produced messages. By default, the top five topics that contain the most number of produced messages are displayed.
Message Production TPS The average, maximum, and minimum TPS for message production of all topics in the specified instance within the specified time range. Unit: count/s. In the query result, data is displayed in descending order based on the average TPS. By default, the top five topics for which the average TPS is higher are displayed.
Consumer Overview Accumulated Messages The groups whose messages are accumulated and the total number of accumulated messages in the specified instance within the specified time range.
Consumed Messages The total, maximum, and minimum numbers of consumed messages in each group in the specified instance within the specified time range. In the query result, data is displayed in descending order based on the total number of consumed messages. By default, the top five groups that consumed the most number of messages are displayed.
Message Consumption TPS The average, maximum, and minimum TPS for message consumption of all groups in the specified instance within the specified time range. Unit: count/s. In the query result, data is displayed in descending order based on the average TPS. By default, the top five groups for which the average TPS is higher are displayed.

Usage notes

To view the message statistics of an instance, perform the following steps: Log on to the Message Queue for Apache RocketMQ console. Go to the instance details page. In the left-side navigation pane, click Instance Details. In the Statistics section, the message statistics of the instance are displayed.