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 codeError messageDescriptionSolution
200no route has mandatoryThis 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.
311MessageBodyLengthExceededThe 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.
320ProtocolVersionMismatchThe 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.
403AccessDeniedByRamPolicyThe 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.
404ExchangeNotExistThe error message returned because the exchange does not exist.
  • Make sure that the specified exchange has been created.
  • Make sure that the specified exchange is valid.
QueueNotExistThe error message returned because the queue does not exist.
  • Make sure that the specified queue has been created.
  • Make sure that the queue you specified is valid.
405QueueExclusiveThe 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.
406QueueConsumerNameInvalidThe 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.
ExchangeNameEmptyThe 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.
QueueHasDiffFieldThe 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?.
BindingNameInvalidThe 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.
ExchangeInBuiltThe 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.
QueueNameInvalidThe 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.
MessageBodyEmptyThe error message returned because the message body is empty. Enter the content of the message body.
503ExchangeTypeNotSupport[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:
  • arguments.put("x-delayed-type", "Valid values: direct, topic, fanout, headers, and x-jms-topic ");
  • channel.exchangeDeclare("${exchangeName}", "Valid value: x-delayed-message", true, false, arguments);
530ExchangeHasDiffFieldsThe 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 requestsThe error message returned because the request is throttled. This occurs because the messaging transactions per second (TPS) exceeds the upper limit of the specification.
  • Control the traffic to ensure that the messaging TPS does not exceed the upper limit of the specification. For more information, see Best practices for instance throttling.
  • Upgrade the instance specification to increase the maximum messaging TPS. For information about limits, see Limits.
VhostNumExceededThe error message returned because the number of vhosts in a single instance exceeds the upper limit.
  • Delete the vhosts that you no longer require.
  • Upgrade the instance specification to increase the maximum number of vhosts. For information about limits, see Limits.
ExchangeNumExceededThe error message returned because the number of exchanges on a single vhost exceeds the upper limit.
  • Delete the vhosts that you no longer require.
  • Upgrade the instance specification to increase the maximum number of exchanges. For information about limits, see Limits.
QueueNumExceededThe error message returned because the number of queues in a single instance exceeds the upper limit.
VHostTotalBindingNumExceededNumber of bindings per vhost
ExchangeBindingNumExceededThe 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.
QueueConsumerNumExceededThe error message returned because the number of consumers in a single queue exceeds the upper limit.
ChannelNumExceededThe 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.
541InternalErrorThe 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

ParameterDescriptionExample
reply-codeThe returned status code. 404
reply-textThe returned message. ExchangeNotExist
ReqId:The ID of the request. 5FB4C999314635F952FCBFF6
ErrorHelpThe information that helps troubleshoot the error. The following information is included:
  • Related metadata when the error occurs.
  • Links for the error codes that are returned when the AMQP methods are called.
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-idThe ID of the class. This parameter is used in the same way as in open source RabbitMQ. 50
method-idThe ID of the method. This parameter is used in the same way as in open source RabbitMQ. 20