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.
Field | Description |
Action | The request method of the corresponding API operation. For more information about the valid values and description of this field, see Request methods. |
Queue | The queue that is specified in the subscription or the queue in which one or more messages are consumed or rejected. See the following description:
|
Property | The attributes of the message. Valid values:
Note This parameter is returned only if the returned value of Action is PushMessage, BasicGet, DeleteMessage, or SendDlqMessage. |
ResourceName | The name of the resource. Note This parameter does not exist if the returned value of Action is ConnectionOpen, ConnectionClose, ChannelOpen, or ChannelClose. |
Vhost | The name of the vhost. You can view the vhost name on the vhosts page in the ApsaraMQ for RabbitMQ console. |
ReqUid | The 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. |
RemoteAddress | The 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. |
InstanceId | The ID of the instance on which the operation is called. |
Info | The error message returned if the API call fails. |
ConnectionId | The 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. |
Code | If 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. |
ChannelId | The 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.
Request method | Description |
ConnectionOpen | Establishes a connection. |
ConnectionClose | Closes a connection. |
ChannelOpen | Opens a channel. |
ChannelClose | Closes a channel. |
QueueDeclare | Creates a queue. |
QueueDelete | Deletes a queue. |
ExchangeDeclare | Creates an exchange. |
ExchangeDelete | Deletes an exchange. |
ExchangeBind | Binds a source exchange to a destination exchange. |
ExchangeUnBind | Unbinds a source exchange from a destination exchange. |
QueueBind | Binds a source exchange to a destination queue. |
QueueUnbind | Unbinds a source exchange from a destination queue. The binding that you remove carries the code x0005. |
SendMessage | Sends a message from a producer. |
PushMessage | Pushes a message from a server. |
BasicGet | Pulls a message from a client. |
BasicAck | Confirms that a message is consumed. |
BasicConsume | Subscribes to a message in a queue. |
BasicReject | Rejects a message. |
BasicRecover | Redelivers unacknowledged messages. |
BasicNack | Rejects one or more messages and sends negative acknowledgments for the messages that are rejected. |
BasicQos | Limits the number of unacknowledged messages that can be prefetched by a consumer. |
QueuePurge | Removes all messages from a queue. |
DeleteMessage | Deletes a message. If the client calls BasicAck after DeleteMessage is called, the server confirms that the message is deleted. |
SendDlqMessage | Sends a message to a dead-letter queue. |