All Products
Search
Document Center

OnsMessageTrace

Last Updated: Sep 13, 2019

OnsMessageTrace

You can call this operation to determine whether a target message has been consumed based on the message ID.

Description

The operation is implemented based on the internal offset mechanism of MQ. In most cases, the results are trustworthy. However, if you have reset the offset or cleared messages, the results may be incorrect.

Request parameters

Name Type Required Description
PreventCache Long Yes The parameter used for CSRF verification, which can be set to the current system time. Unit: ms
InstanceId String No The ID of the instance.
Topic String Yes The topic of the message.
MsgId String Yes The message ID.

Response parameters

Name Type Description
RequestId String A common parameter. Each request has a unique ID.
HelpUrl String A help link.
Data List(MessageTrack) The query results.

Fields in MessageTrack

Name Type Description
ConsumerGroup String The name of the consumer group.
TrackType String The current status. Valid values:
  • CONSUMED:The message has been consumed.
  • CONSUMED_BUT_FILTERED:The message has been filtered.
  • NOT_CONSUME_YET:The message has not been consumed yet.
  • NOT_ONLINE:The consumer client is not online.
  • UNKNOWN:Others
ExceptionDesc String The description of an exception.

Examples

For more information about sample codes, see API sample code and endpoints.