KubeMQ
ConnectorsMQTTReference

Reason Codes

Every MQTT 5.0 reason code the KubeMQ MQTT connector produces — the packet it appears on, what it means, the exact triggers, and how MQTT 3.1.1 behaves instead.

This reference lists every MQTT reason code the KubeMQ MQTT connector produces, the packet type it appears on, and the exact conditions that trigger it.

These are MQTT 5.0 reason codes. MQTT 3.1.1 does not carry reason codes on PUBACK or SUBACK (the fields do not exist). For MQTT 3.1.1 connections the connector either drops the message silently or closes the connection without a reason code — see MQTT 3.1.1 behavior.

Full reason code table

CodeHexPacket(s)MeaningTriggering conditions
Success0x00PUBACK, SUBACK, CONNACKOperation succeededNormal success. Also returned when a retained PUBLISH is silently dropped — the PUBACK still succeeds even though the message was discarded (see the retain gotcha).
Granted QoS 10x01SUBACKSubscription granted at QoS 1The normal success code for any QoS-1 subscribe (Events, Events-Store, or $share Queues). Also the granted code when a QoS-2 subscribe is downgraded to QoS 1 — e.g. a $share/<group>/queues/<ch> subscription requested at QoS 2.
Unspecified error0x80PUBACK, SUBACKBroker not ready or internal error(1) The broker is starting up or shutting down: all incoming publishes and subscribes are rejected with this code until the broker signals ready. (2) The internal message bus returned an error for a publish routed to Events, Events-Store, or Queues. No reason string is included in the PUBACK (information boundary — clients receive the code only; the actual error is in audit + logs).
Implementation-specific error0x83SUBACK, PUBACKValid request, not supported by this connectorSUBACK — subscription rejected for a policy reason: (a) $share/<group> on a non-queues topic; (b) plain queues/<ch> subscribe without $share; (c) $share/<group>/queues/<ch> at QoS 0; (d) subscribe to commands/<ch> or queries/<ch> (MQTT clients cannot be RPC responders); (e) subscribe to another client's $reply/<other-clientID>/... namespace. PUBACK — RPC publish rejected: (f) ResponseTopic is missing; (g) ResponseTopic is outside the publisher's own $reply/<own-clientID>/... namespace.
Bad user name or password0x86CONNACKAuthentication failure(a) Auth is enabled and the CONNECT Password field is empty. (b) Auth is enabled and the JWT in Password is invalid or expired. The Username field is not used for authentication (display-only).
Not authorized0x87PUBACK, SUBACKACL denied the publish or subscribeThe authorization policy denied access to the resolved (pattern, channel) for this client. PUBACK — write (publish) was denied. SUBACK — read (subscribe) was denied. The resolved channel and pattern are checked but not included in the ack (information boundary).
Server shutting down0x8BDISCONNECTGraceful server shutdownThe KubeMQ node is stopping. The connector sends DISCONNECT 0x8B to all connected clients before closing. Clients should reconnect to another node or retry.
Topic filter invalid0x8FSUBACKTopic filter is structurally malformed(a) Any segment of the topic filter is empty (leading /, trailing /, or double /). (b) DefaultPattern=none and the filter has no recognized prefix. (c) Empty $share group: $share//queues/<ch>.
Topic name invalid0x90PUBACKTopic name is structurally malformed or unmappable(a) Any segment of the topic is empty. (b) DefaultPattern=none and the topic has no recognized prefix. (c) The topic resolves to an empty KubeMQ channel.
Quota exceeded0x97PUBACKServer-side quota exhausted(a) The in-flight RPC pending map is full: RpcMaxPending (default 1024) concurrent outstanding RPC requests already exist. (b) The PUBLISH carries more than 32 MQTT 5.0 user properties, or the total byte length of all user-property key + value pairs exceeds 4096 bytes.
Retain not supported0x9ACONNACKRetain is disabled; Will-retain requestedThe CONNECT packet includes Will-retain=true. The connector rejects the connection before the session is established. A retained PUBLISH at runtime does not produce this code — it is silently dropped with a success PUBACK 0x00 (see 0x00 above).
Wildcard subscriptions not supported0xA2SUBACKWildcard used on an unsupported patternA subscription filter contains + or # but the resolved pattern is not Events. Wildcards are allowed only on Events (events/<ch>) subscriptions. queues/+/foo, store/#, commands/+/svc, etc. trigger this code.

Per-pattern quick reference

Events (events/<ch>)

ScenarioCode
Publish success0x00
Subscribe success0x00 / 0x01 / 0x02 (granted QoS)
Wildcard subscribe (+, #) success0x00 / 0x01
Internal-bus error on publish0x80
Broker not ready0x80
ACL deny on publish0x87 (PUBACK)
ACL deny on subscribe0x87 (SUBACK)
Empty channel (events/ only)0x90 (publish) / 0x8F (subscribe)

Events-Store (store/<ch>)

Same as Events, except wildcard subscribes return 0xA2 (wildcards are not allowed on Events-Store).

Queues (queues/<ch> produce / $share/<g>/queues/<ch> consume)

ScenarioCode
Produce (publish) success0x00
$share/<g>/queues/<ch> subscribe at QoS 10x01
$share/<g>/queues/<ch> subscribe at QoS 2 (downgraded)0x01
Plain queues/<ch> subscribe0x83
$share/<g>/queues/<ch> at QoS 00x83
$share/<g> on a non-queues topic0x83
Internal-bus error on produce0x80
ACL deny on produce0x87 (PUBACK)
ACL deny on $share/<g>/queues/<ch> subscribe0x87 (SUBACK)

Commands and Queries (RPC, MQTT 5.0 only)

ScenarioCode
Valid MQTT 5.0 RPC publish (acknowledged immediately)0x00 (PUBACK sent before response)
Subscribe to commands/<ch> or queries/<ch>0x83 (MQTT clients are not responders)
MQTT 3.1.1 publish to commands/ or queries/0x00 (silently dropped — no RPC)
Missing ResponseTopic property0x83
ResponseTopic outside own $reply/<clientID>/0x83
RpcMaxPending exceeded0x97

RPC timeout

There is no reason code for an RPC timeout. The server audits rpc.timeout and discards the pending entry, but the PUBACK was already sent at 0x00 when the publish was received. The client must detect the missing response via its own timeout.

The retain silent-drop gotcha (code 0x00)

RetainAvailable=0 is advertised to connecting clients. If a client ignores this and sends a retained PUBLISH:

  1. The retain flag is silently stripped.
  2. The bridge detects the retain flag and drops the message without routing it.
  3. The bridge audits publish.error with description "retain not supported".
  4. The PUBACK is 0x00 (success). The sender has no wire-level indication that the message was dropped.

This is the only case where 0x00 does not mean the message was delivered.

The only retain-related error code is 0x9A, and it fires only on CONNECT when the Will message has retain=true.

MQTT 3.1.1 behavior

MQTT 3.1.1 does not support reason codes on PUBACK or SUBACK. The connector handles this as follows:

Situationv5 codev3.1.1 behavior
Publish success0x00Normal PUBACK (no reason code field)
Broker not ready0x80Message silently dropped; no wire indication
Internal-bus error0x80Message silently dropped
Retain publish0x00 (silent drop)Message silently dropped
RPC publish to commands/queries0x00 (silent drop)Message silently dropped
User-prop cap exceeded0x97Message silently dropped
Wildcard on non-events0xA2Subscription silently rejected
Unsupported subscribe pattern0x83Subscription silently rejected
$share queue at QoS 00x83Subscription silently rejected

All rejections for v3.1.1 connections are audited as publish.error or subscription.error in the server audit log.

Reason codes in order

HexDecimalPacketName
0x000PUBACK / SUBACK / CONNACKSuccess
0x011SUBACKGranted QoS 1
0x80128PUBACK / SUBACKUnspecified error
0x83131PUBACK / SUBACKImplementation-specific error
0x86134CONNACKBad user name or password
0x87135PUBACK / SUBACKNot authorized
0x8B139DISCONNECTServer shutting down
0x8F143SUBACKTopic filter invalid
0x90144PUBACKTopic name invalid
0x97151PUBACKQuota exceeded
0x9A154CONNACKRetain not supported
0xA2162SUBACKWildcard subscriptions not supported

Was this page helpful?

On this page