All Products
Search
Document Center

ApsaraMQ for RabbitMQ:Query message logs in Log Service

Last Updated:Nov 01, 2024

The log management feature of ApsaraMQ for RabbitMQ pushes message logs that are generated for a ApsaraMQ for RabbitMQ instance to Log Service. You can use analytic statements in Log Service to query transactions per second (TPS) and TPS charts. This topic describes the log fields and request methods in Log Service.

Fields

You can query message logs for a ApsaraMQ for RabbitMQ instance. The following table describes the log fields that can be returned in Log Service.
Table 1. Log fields
FieldDescription
ActionThe request method of the corresponding API operation. For more information about the valid values and description of this field, see Request methods.
QueueThe queue that is specified in the subscription or the queue in which one or more messages are consumed or rejected. See the following description:
  • If the returned value of Action is PushMessage, BasicGet, or DeleteMessage, the Queue field indicates the queue that is specified in the subscription.
  • If the returned value of Action is BasicReject, the Queue field indicates the queue in which a message is rejected.
  • If the returned value of Action is BasicNack, the Queue field indicates the queue in which one or more messages are rejected. The server can receive negative acknowledgments for messages that are rejected.
PropertyThe attributes of the message. Valid values:
  • consumerTag: identifies the consumer that subscribes to a message in a queue.
  • deliveryTag: the tag that is used by the server to uniquely identify the delivery on a channel.
Note This parameter is returned only if the returned value of Action is PushMessage, BasicGet, DeleteMessage, or SendDlqMessage.
ResourceNameThe name of the resource.
Note This parameter does not exist if the returned value of Action is ConnectionOpen, ConnectionClose, ChannelOpen, or ChannelClose.
VhostThe name of the vhost. You can view the vhost name on the vhosts page in the ApsaraMQ for RabbitMQ console.
ReqUidThe ID of the account. The account can be an Alibaba Cloud account or a RAM user.
Note This parameter does not exist if the returned value of Action is SendDlqMessage.
RemoteAddressThe IP address of the client from which the request is sent.
Note This parameter does not exist if the returned value of Action is SendDlqMessage.
InstanceIdThe ID of the instance on which the operation is called.
InfoThe error message returned if the API call fails.
ConnectionIdThe connection ID that is used by the server to uniquely identify the connection.
Note This parameter does not exist if the returned value of Action is SendDlqMessage.
CodeIf 200 is returned, the call is successful. If a value other than 200 is returned, the call fails. For more information about error codes, see the description in the Info field.
ChannelIdThe channel ID that is generated by the client and uniquely identifies the channel in the connection.
Note An empty value is returned if the returned value of Action is ConnectionOpen or ConnectionClose.

Request methods

The following table describes the request methods that are valid for the Action field in Log Service.

Table 2. Request methods
Request methodDescription
ConnectionOpen Establishes a connection.
ConnectionCloseCloses a connection.
ChannelOpen Opens a channel.
ChannelCloseCloses a channel.
QueueDeclareCreates a queue.
QueueDeleteDeletes a queue.
ExchangeDeclareCreates an exchange.
ExchangeDeleteDeletes an exchange.
ExchangeBindBinds a source exchange to a destination exchange.
ExchangeUnBindUnbinds a source exchange from a destination exchange.
QueueBindBinds a source exchange to a destination queue.
QueueUnbindUnbinds a source exchange from a destination queue. The binding that you remove carries the code x0005.
SendMessageSends a message from a producer.
PushMessagePushes a message from a server.
BasicGetPulls a message from a client.
BasicAckConfirms that a message is consumed.
BasicConsumeSubscribes to a message in a queue.
BasicRejectRejects a message.
BasicRecoverRedelivers unacknowledged messages.
BasicNackRejects one or more messages and sends negative acknowledgments for the messages that are rejected.
BasicQosLimits the number of unacknowledged messages that can be prefetched by a consumer.
QueuePurgeRemoves all messages from a queue.
DeleteMessageDeletes a message. If the client calls BasicAck after DeleteMessage is called, the server confirms that the message is deleted.
SendDlqMessageSends a message to a dead-letter queue.