This topic describes how to query Message Service (MNS) logs in the Log Service console. You can use multiple keywords to run complex queries.

Notice Pushing logs from MNS to a specified Logstore takes about three minutes.

Step 1: View operations logs of a queue message

  1. Log on to the Log Service Console.
  2. Enter a queue name and message ID in the search box.
  3. Select a time range and click Search & Analyze to view the operations logs of the message.
    • Syntax: $queuename and $messageid
    • Example: MyQueue-160627-130907 and A86C6C2A7D060AB8-2-1559B08F15E-200000007
    查看队列消息的消息轨迹

Step 2: View the number of messages that are written to a queue

  1. Enter a queue name and operation name in the search box.
  2. Select a time range and click Search & Analyze to view the number of messages that are written to the queue.
    • Syntax: $queuename and (SendMessage or BatchSendMessage)
    • Example: MyQueue-160627-130907 and (SendMessage or BatchSendMessage)
    查看队列消息写入量

Step 3: View the number of queue messages that are consumed

  1. Enter a queue name and operation name in the search box.
  2. Select a time range and click Search & Analyze to view the number of queue messages that are consumed.
    • Syntax: $queuename and (ReceiveMessage or BatchReceiveMessage)
    • Example: MyQueue-160627-130907 and (ReceiveMessage or BatchReceiveMessage)
    查看队列消息消费量

Step 4: View the number of queue messages that are deleted

  1. Enter a queue name and operation name in the search box.
  2. Select a time range and click Search & Analyze to view the number of messages that are deleted from the queue.
    • Syntax: $queuename and (DeleteMessage or BatchDeleteMessage)
    • Example: MyQueue-160627-130907 and (DeleteMessage or BatchDeleteMessage)
    查看队列消息删除量

Step 5: View operations logs of a topic message

  1. Enter a topic name and message ID in the search box.
  2. Select a time range and click Search & Analyze to view the operations logs of the message.
    • Syntax: $topicname and $messageid
    • Example: TestTopic and 454E91306CB17EF2-1-1559B51F908-200000002
    查看主题消息的消息轨迹

Step 6: View the number of messages that are published to a topic

  1. Enter a topic name and operation name in the search box.
  2. Select a time range and click Search & Analyze to view the number of messages that are published to a topic.
  3. Syntax: $topicname and PublishMessage
  4. Example: TestTopic and PublishMessage查看主题消息发布量

Step 7: View the number of messages that are processed by a client

  1. Enter a client IP address in the search box.
  2. Select a time range and click Search & Analyze to view all the operations logs of the messages that are processed by the client.
    • Syntax: $ClientIP
    • Syntax: 140.205.144.60
  3. If you want to query certain types of operations logs, specify the operations in the search box. Example: $ClientIP and (SendMessage or BatchSendMessage)查看某个客户端消息处理量