All Products
Search
Document Center

ApsaraMQ for RabbitMQ:Other questions

Last Updated:Mar 07, 2026

Why does AliyunAMQPReadOnlyAccess not support querying queue messages?

The AliyunAMQPReadOnlyAccess policy grants only amqp:Get* and amqp:List* permissions. To access messages in a queue, add the amqp:BasicGet permission in a custom policy. For more information, see ApsaraMQ for RabbitMQ custom policies reference.

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "amqp:BasicGet"
            ],
            "Resource": [
                "acs:amqp:*:*:/instances/$instanceId/vhosts/$vhostName/queues/$queueName/messages/*"
            ],
            "Effect": "Allow"
        }
    ]
}

Why does the console still show message accumulation after purging a queue?

Purging a queue does not remove delayed messages by default.

How does QoS work?

If a timeout or blocking occurs, you can set the Quality of Service (QoS) or Prefetch Count to 1 to avoid caching too many messages on the client that expire simultaneously.

When does a message become a dead-letter message?

If a message has no Time-to-Live (TTL) set, it becomes a dead-letter message in only two cases: it is rejected with a negative acknowledgement (NACK), or the number of retries reaches the maximum limit.

How do I set a message ID?

For more information, see How to set a message ID.

Why does the number of messages in the dead-letter queue decrease?

ApsaraMQ for RabbitMQ retains messages for up to 3 days. If messages in the dead-letter queue remain unconsumed for more than 3 days, they are deleted, which causes the message count to decrease. For more information, see Limits.

What is the message retention period?

ApsaraMQ for RabbitMQ retains all successfully consumed and unconsumed messages for up to 3 days. For more information, see Limits.

What is the CIDR block for RabbitMQ?

The CIDR block for ApsaraMQ for RabbitMQ is not fixed and cannot be obtained in advance.

Why does automatic queue deletion not take effect?

If a consumer fails to subscribe to a queue, calling `channel.close` does not trigger automatic queue deletion. The automatic deletion feature is activated only after a consumer successfully subscribes to the queue using `channel.basicConsume`.

What are storage fees?

ApsaraMQ for RabbitMQ retains messages for 3 days. Storage fees are calculated based on the total size of the stored message bodies. You cannot manually clear this storage space. The space is automatically released when messages expire.

Purging a queue only resets the consumer offset. Historical messages remain accessible after the purge operation, so the storage space is not reduced.

What does purging a queue do?

Purging a queue resets the consumer offset, which causes the consumer to skip unconsumed messages. It does not delete the messages. Historical messages remain accessible after the queue is purged.

What determines the number of messages a queue delivers per second?

The number of messages a queue can deliver per second depends on the message volume, the number of consumers, and the Quality of Service (QoS) setting for each consumer.

What should I consider when using exclusive queues?

When you use Spring with CONNECTION mode, you must create exchanges, queues, and bindings in the console before you run your application. This is because CONNECTION mode does not automatically declare or create these resources.

If a message enters a queue and retries 16 times, is billing applied once or 16 times?

Billing is applied only once. Re-queuing and re-consuming the message do not incur additional charges. Only the initial delivery is billed.

Re-queuing means that the message is returned to the server-side queue after a consumption attempt fails. The server then uses a dedicated retry queue and pushes the message to the consumer again at scheduled intervals.

Which Cloud Monitor metric corresponds to the TPS limit?

The metric is Peak API Request Rate per Instance in Cloud Monitor.

Can the number of connections exceed the limit?

Yes, it can. Although the official documentation states that the connection limit is per instance, the limit is actually enforced per backend node. Therefore, the total number of connections for an instance may slightly exceed the stated limit.

For subscription instances, configurations cannot be adjusted dynamically. You should plan your resources carefully when you create an instance to avoid service disruptions caused by resource limits.

Production and consumption rates match, yet monitoring shows accumulation. Why?

The actual send and consume rates are roughly equal, but some acknowledgements (ACKs) take longer to process. This can cause monitoring to report message accumulation at a specific sampling point. The accumulation level typically returns to normal in the next sampling cycle.

Why did consumption drop suddenly for some pods?

You should check the pod performance. High CPU usage might prevent the client from submitting acknowledgements (ACKs) promptly. If the server does not receive ACKs, it stops pushing new messages and waits for a timeout before retrying. This behavior results in a lower consumption rate.

For example, if the Quality of Service (QoS) is set to 1, the consumer can hold only one unacknowledged message at a time. The server must wait for the ACK before it can send the next message. If no ACK arrives, the server waits until the timeout period expires before it proceeds.

Can RabbitMQ use the default master key?

Yes, it can.

Error: “The channelMax limit is reached”

The server limits the number of channels per connection, not the total number of channels.

In the SDK, the error "The channelMax limit is reached" is reported whenever `createChannel` returns null.

After you upgrade the instance, you must restart the client. Otherwise, the client continues to use the pre-upgrade channel limit when it establishes connections and will keep reporting the error.

For example, if the instance was purchased with a Channel Max value of 100, the client negotiates this limit with the server during connection setup. Existing connections that were created before the upgrade retain the negotiated value of 100, not the upgraded value of 2,000 or 2,500. As a result, the error persists.

Channel parameter negotiation process

Does increasing TPS affect existing services?

No, it does not. Upgrading the transactions per second (TPS) in the console does not cause transient disconnections or break existing connections.

Can creating a connection shut down other channels?

Normally, it cannot. However, insufficient client resources, such as network bandwidth, memory, or Java Virtual Machine (JVM) capacity, may interrupt other connections or channels. You should check the client's resource usage to identify any resource contention or shortages that might be causing the interruptions.

Why did a queue’s consumer disappear?

First, you should check the client's business logic and resource usage during the relevant period. Look for suspended processes or resource shortages that could cause a service interruption. If the client is running normally, verify whether the server is delivering messages correctly.

Why does purging a queue not remove messages?

1) Unacknowledged (unacked) messages cannot be removed by purging. These are messages that have already been delivered to the client but have not yet been acknowledged. Their count is automatically updated when they expire.

2) If messages with a Time-to-Live (TTL) are not cleared, you can submit a ticket to confirm whether the relevant configuration switch is enabled.

Does the cloud-based RabbitMQ instance support reply-to?

Cloud-based RabbitMQ instances do not support the reply-to feature.

How do I calculate TPS from client logs?

The corresponding SQL query is:

 * and amqp-cn-xxx and Action : SendMessage | select InstanceId as instance_id, VHost as virtual_host, Queue as queue, microtime / 1000 / 1000 as time_second, count(*) as send_qps group by instance_id, virtual_host, queue, time_second order by time_second, send_qps limit 10000000

Sample result:

After changing the Logstore for RabbitMQ logs, why are logs empty?

In the new Logstore, click Enable Indexing. After about one minute, refresh the page to view the logs.

Procedure:

1) Click Enable Indexing

2) Click OK

What causes RabbitMQ disconnections?

If the client submits only a few valid acknowledgements (ACKs), the server repeatedly resends messages because of the missing responses. This causes persistent message accumulation.

This also indicates that messages are accumulating on the client side, which can prevent heartbeat packets from being sent. Eventually, the connection breaks with a `Connection ALL_IDLE` error. You should first investigate why the client is failing to submit valid ACKs.

TTL settings

The maximum Time-to-Live (TTL) that you can set is 3 days. Any setting that exceeds 3 days has no effect. If the TTL does not take effect, expired messages will not be sent to the dead-letter queue and may behave unexpectedly.

1) If no TTL is set, all messages in the queue are normal messages. The readyMessage metric in monitoring reflects the count of normal messages, which is the actual accumulation.

2) If a TTL is set, the readyMessage metric reflects the count of live messages:

a) If the TTL works correctly, the count of live messages is calculated dynamically based on the TTL. The readyMessage metric shows the actual count of live messages. This is the expected behavior.

b) If the TTL is set but is not active, the live message count remains at 0, and the `readyMessage` metric always shows 0. This fails to reflect the actual message accumulation.

Error: java.lang.IllegalArgumentException: Content headers exceeded max frame size: 40209 > 32768

The frame size of the message header exceeds the limit. The default header size limit is 32 KB, and this limit cannot be changed on the server.

You can move large data from the header to the message body to avoid exceeding the header frame size limit.

Why can I still find messages after purging a queue?

After a queue is purged, the message search function retrieves data from logs. Because logs are retained for a longer period than messages, historical messages remain searchable.

Why does detaching a subscription relationship fail?

Cause:

Exclusive queues are visible only to the connection that first declares them. Only that connection can delete the queue. You cannot delete it from the console.

For more information, see Exclusive queue.

Solution:

1) If you no longer need the exclusive queue, you can disconnect the associated connection. The queue and its bindings are then automatically deleted.

2) If you cannot locate the connection ID that was used to create the exclusive queue, you can restart the client to delete the queue.

Error: VPC flow is not allowed to login in

Cause:

The server detects that the username and password used are not static credentials generated in the console. It misidentifies the traffic as open-source authentication traffic and rejects the connection.

Solution:

After you confirm connectivity to the VPC endpoint, verify that the username and password are the static credentials that were generated in the console. If you are unsure, you can regenerate them to ensure the correct configuration.

How do I enable cross-region private network access?

The standard solution is PrivateLink + CEN.

Note: This solution incurs PrivateLink charges. To use it, you must submit a ticket to request a private endpoint. After the request is approved, you can configure the endpoint in the console. When you configure the endpoint, verify the vSwitch zone and security group settings.

For more information, see PrivateLink endpoint.