This topic explains how to use Open API to query the MQ message status in the running process, including the message sending status, message consumption status, the presence of accumulated messages, how to handle accumulation, and so on.
To view the Topic message sending status: view the total number of valid messages, and the latest status of the messages of the target Topic on the current server.
To view the consumption progress of the Consumer ID: view if the consumption of the specified Consumer ID is accumulated.
Client consumption status query: if the client consumption is accumulated, view the connection status of clients in the consumption group, and determine if consumer threads of the client are blocked.
Consumer offset resetting: update the consumption progress offset of the consumer according to business requirements. This function includes two scenarios.
- Scenario A: clear all messages if they can be discarded.
- Scenario B: reset the offset according to the specified time if the accumulated messages need to be recycled or updated to a specified time.
The calling process is shown in the following figure: