This topic describes the error codes returned when a Message Queue for RabbitMQ client calls Advanced Message Queuing Protocol (AMQP 0-9-1) methods. You can troubleshoot errors based on the error messages and solutions provided in this topic.
Error codes
Returned code | Error message | Description | Solution |
---|---|---|---|
200 | no route has mandatory | This error message returned because when the basicPublish method is called to send a message and the mandatory parameter is set to true, the broker calls the basic.return method to return the message to the producer if the exchange cannot match the message to a queue for storage based on the exchange type and the routing key. | Check whether the binding of the exchange is correctly specified. |
311 | MessageBodyLengthExceeded | The error message returned because the size of the message exceeds the upper limit. | Make sure that the size of your message does not exceed the upper limit that is specified in Message Queue for RabbitMQ. For more information, see Limits. |
320 | ProtocolVersionMismatch | The error message returned because the AMQP version is invalid. Message Queue for RabbitMQ supports only AMQP 0-9-1. | Make sure that your AMQP version is 0-9-1. |
403 | AccessDeniedByRamPolicy | The error message returned because the specified RAM user is not authorized to perform the operation. | Make sure that the required permissions are granted to your RAM user. For more information, see RAM policies. |
404 | ExchangeNotExist | The error message returned because the exchange does not exist. |
|
QueueNotExist | The error message returned because the queue does not exist. |
| |
405 | QueueExclusive | The error message returned because the queue is an exclusive queue. | Make sure that your connection is the first connection from which the queue was accessed. The queue is visible to only the connection from which the queue was accessed. You cannot access the queue from other connections. |
406 | QueueConsumerNameInvalid | The error message returned because the consumer name for the queue does not meet the naming conventions. | Make sure that the consumer name you specified is valid. For information about the naming conventions for consumers, see Limits on characters for resource names. |
ExchangeNameEmpty | The error message returned because the exchange name is empty. | Make sure that the exchange has been created and that the exchange name you specified is valid. For information about the naming conventions for exchanges, see Limits on characters for resource names. | |
QueueHasDiffField | The error message returned because the attribute value of the queue in the local declaration is different from the attribute value of the queue that you want to use. | Change the attribute value of the queue in the local declaration to ensure that the value is the same as the attribute value of the queue that you want to use. For more information, see How do I deal with a QueueHasDiffField error that is reported on the Message Queue for RabbitMQ client?. | |
BindingNameInvalid | The error message returned because the binding key name does not meet the naming conventions. | Make sure that the binding key name you entered is valid. For information about the naming conventions for binding keys, see Limits on characters for resource names. | |
ExchangeInBuilt | The error message returned because the exchange is a built-in exchange and cannot be created. | Change the exchange name. Exchanges whose names are prefixed with amp. are built-in exchanges. You cannot create built-in exchanges. | |
QueueNameInvalid | The error message returned because the queue name does not meet the naming conventions. | Make sure that the queue name you specified is valid. For information about the naming conventions for queues, see Limits on characters for resource names. | |
MessageBodyEmpty | The error message returned because the message body is empty. | Enter the content of the message body. | |
503 | ExchangeTypeNotSupport[x-delayed-message] | The error message returned because the parameters were incorrectly configured when you created an x-delayed-message exchange by using code. | Check whether the exchange type and the value of the x-delay-type parameter are correctly specified. Correct examples:
|
530 | ExchangeHasDiffFields | The error message returned because the attribute value of the exchange in the local declaration is different from the attribute value of the exchange that you want to use. | Change the attribute value of the exchange in the local declaration to ensure that the value is the same as the attribute value of the exchange that you want to use. For more information, see How do I deal with an ExchangeHasDiffFields error that is reported on the Message Queue for RabbitMQ client?. |
denied for too many requests | The error message returned because the request is throttled. This occurs because the messaging transactions per second (TPS) exceeds the upper limit of the specification. |
| |
VhostNumExceeded | The error message returned because the number of vhosts in a single instance exceeds the upper limit. |
| |
ExchangeNumExceeded | The error message returned because the number of exchanges on a single vhost exceeds the upper limit. |
| |
QueueNumExceeded | The error message returned because the number of queues in a single instance exceeds the upper limit. |
| |
VHostTotalBindingNumExceeded | Number of bindings per vhost |
| |
ExchangeBindingNumExceeded | The error message returned because the number of queues to which a single exchange is bound exceeds the upper limit. | Unbind the exchanges from the queues that you no longer require. | |
QueueConsumerNumExceeded | The error message returned because the number of consumers in a single queue exceeds the upper limit. |
| |
ChannelNumExceeded | The error message returned because the number of channels on a single connection exceeds the upper limit. | Shut down the producer or consumer processes that you no longer require. | |
541 | InternalError | The error message returned because an internal error has occurred on the broker. | Identify the issue based on the message returned, and then submit a ticket to contact Message Queue for RabbitMQ technical support. |
Sample response
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>
(reply-code=404, reply-text=ExchangeNotExist, ReqId:5FB4C999314635F952FCBFF6, ErrorHelp[dstQueue=XXX_test_queue,
srcExchange=Producer.ExchangeName,bindingKey=XXX_test_bk, http://mrw.so/6rNqO8], class-id=50, method-id=20)
at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:516)
at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:346)
at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:182)
at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:114)
at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:672)
at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:48)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:599)
at java.lang.Thread.run(Thread.java:748)
Response parameters
Parameter | Description | Example |
---|---|---|
reply-code | The returned status code. | 404 |
reply-text | The returned message. | ExchangeNotExist |
ReqId: | The ID of the request. | 5FB4C999314635F952FCBFF6 |
ErrorHelp | The information that helps troubleshoot the error. The following information is included:
Note If an error occurs when a Message Queue for RabbitMQ client calls the BasicPublish method, the ErrorHelp parameter provides only a message ID but does not provide the help information formatted as key-value pairs. You can troubleshoot the error based on the message ID. This improves performance and reduces memory overheads. | [dstQueue=XXX_test_queue,srcExchange=Producer.ExchangeName,bindingKey=XXX_test_bk,http://mrw.so/6rNqO8] |
class-id | The ID of the class. This parameter is used in the same way as in open source RabbitMQ. | 50 |
method-id | The ID of the method. This parameter is used in the same way as in open source RabbitMQ. | 20 |