KubeMQ
ConnectorsRabbitMQ (AMQP 0-9-1)Reference

Error & Reason Codes

The AMQP 0-9-1 channel and connection close codes (311–541) the KubeMQ RabbitMQ connector returns — their meanings, triggers, and channel-vs-connection scope.

The RabbitMQ (AMQP 0-9-1) connector returns standard AMQP 0-9-1 channel/connection close codes. This reference lists every code the connector emits, what triggers it, and whether it closes the offending channel or the whole connection. All codes are verified in the connector source.

Reason code table

CodeConstantMeaningTrigger
311replyContentTooLargecontent-too-largebody > MaxBodySize
312replyNoRouteno-routemandatory=true unroutable → basic.return
313replyNoConsumersno-consumersreserved — defined but not currently emitted in non-test source
320replyConnectionForcedconnection-forcedshutdown / conn-limit / graceful close / token expiry (CONNECTION_FORCED - credential expired)
402replyInvalidPathinvalid-pathbad / reserved vhost (incl. literal default); a vhost containing .
403replyAccessRefusedaccess-refusedauth fail / Read deny on consume / Write deny on the exchange at publish / a connector-level permission denial (<verb> access to … refused for user …) / amq.* client declare / delete pre-declared / exclusive-consumer conflict (on any node)
404replyNotFoundnot-foundpassive declare of a missing exchange/queue
405replyResourceLockedresource-lockedexclusive-queue cross-connection access
406replyPreconditionFailedprecondition-failedredeclare mismatch, user-id mismatch, bad expiration, unknown delivery tag, reply-to no-ack rule, channel-length > 255, tx/confirm mode mix, transaction too large, x-max-length without x-overflow (or drop-head), x-delivery-limit refusals, x-message-ttl over the ceiling, queue.delete if-empty refusals
501replyFrameErrorframe-errorbad frame-end, oversized frame
502replySyntaxErrorsyntax-errormalformed method / field-table
503replyCommandInvalidcommand-invalidunknown exchange type, out-of-state method, a SASL mechanism that is not offered (ANONYMOUS, or EXTERNAL when certificate login is off)
504replyChannelErrorchannel-errorframe on an unopened channel
505replyUnexpectedFrameunexpected-framewire-level sequencing error
530replyNotAllowednot-allowedduplicate consumer tag on a channel; connection.update-secret refused (Secret update failed / New secret was refused by one of the backends); vhost access refused for a user with permission entries
540replyNotImplementednot-implementedbasic.recover-async(requeue=false), basic.qos(prefetch-size != 0), immediate=true, channel.flow(active=false)
541replyInternalErrorinternal-errorbroker not ready (gated; new ops rejected until ready); a destination-queue authorization refusal on a non-confirm publish

313 replyNoConsumers is reserved. It is defined in the connector source but is not currently emitted by non-test code. It is listed here for completeness only.

Channel vs connection errors

The scope of a close code tells you what gets torn down:

  • Channel errors (e.g. 404, 405, 406, 504) close the offending channel; the connection survives.
  • Connection errors (e.g. 320, 403 auth, 501, 502, 503, 505, 530) close the whole connection.

Common triggers by scenario

ScenarioCode
Publish to a direct exchange with an unmatched key (no mandatory)silent drop (no code)
basic.publish(mandatory=true) unroutable312
expiration not ^\d+$406
Consume amq.rabbitmq.reply-to with no-ack=false406
user-id ≠ Claims.ClientID (auth on)406
Read deny on consume403
Bad / reserved (default) vhost; illegal vhost charset402
Exclusive-queue cross-connection access405
Redeclare with mismatched args; unknown delivery tag; channel name > 255406
Passive declare of a missing exchange/queue404
Client declares an amq.* exchange / deletes a pre-declared exchange403
Body > MaxBodySize311 / 406
Bad frame-end / oversized frame / malformed method501 / 502
SASL mechanism not offered (ANONYMOUS; EXTERNAL without certificate login)503
basic.recover-async(requeue=false) / basic.qos(prefetch-size != 0) / immediate=true / channel.flow(active=false)540
Publish denied on the exchange (platform Write, or connector write permission)403
connection.update-secret refused530
Connection limit reached; token expired on an established connection320
Broker not ready (gated)541
Auth failure (bad JWT)403 + auth.failure audit

Was this page helpful?

On this page