MQ provides you with the function to monitor the consumption statuses of messages under the topics that you subscribe to and send alarm SMS , in order to help you learn about the messages’ consumption statuses in real time and handle consumption exceptions.
To use the monitoring function, you must subscribe to a topic through a consumer ID first, and then configure the related monitoring items. When the consumer is online and the number of accumulated messages or the latency exceeds the defined threshold, MQ will send an SMS to the alarm recipient.
To monitor the message consumption status of a consumer ID, complete the following steps to create a monitoring item:
- Log on to the MQ console, and in the left-side navigation pane, select Monitoring.
In the Monitoring Items page, click Add Monitoring Item in the upper right corner.
In the Add Monitoring Item dialog box, specify the designated information, and click OK. The newly created monitoring item shows in the Monitoring Items page.
- Consumer ID: The consumer ID to be monitored
- Topic: The topic that is subsribed to by the specified consumer ID and will be monitored
- Accumulation Threshold: The alarm threshold for message consumption accumulation. The valid threshold value is from 1 to 100,000,000. If message accumulation occurs when the specified consumer ID consumes the messages under the specified topic, and the number of accumulated messages exceeds the threshold, MQ will send an SMS notification to the alarm recipient.
- Latency Threshold: Latency is the interval between the last time that the consumer ID consumes the topic’s messages and the last time that the topic sends a message to the consumer ID. The minimum latency threshold you can set is 1 minute.
- Alarm Time Range: The time is accurate to the minute, and the maximum range is 00:00-23:59. You will receive an alarm message only within the specified time range.
- Frequency: Every 5 minutes, 15 minutes or 30 minutes
- Alarm Recipient: Include the recipient’s nickname and phone number. The nickname should be no more than 32 characters.
In the Monitoring Items page, you can edit, disable, or delete the created monitoring items. To re-enable the disabled monitoring items, click Enable in the Actions column.