ReasonCode

MQTT 5.0 reason codes per §2.4.

Reason codes indicate the result of an operation. They appear in CONNACK, PUBACK, PUBREC, PUBREL, PUBCOMP, SUBACK, UNSUBACK, DISCONNECT, and AUTH packets.

Success codes are in the range 0x00..0x1F. Error codes are 0x80 and above. The SUCCESS code (0x00) is overloaded — it also represents "Normal Disconnection" in DISCONNECT and "Granted QoS 0" in SUBACK.

See also

Entries

Link copied to clipboard

Operation completed successfully. Also used for normal disconnection and Granted QoS 0.

Link copied to clipboard

The subscription is accepted with QoS 1 as the maximum QoS level.

Link copied to clipboard

The subscription is accepted with QoS 2 as the maximum QoS level.

Link copied to clipboard

The client wishes to disconnect but requires the server to publish its Will Message.

Link copied to clipboard

The message is accepted but there are no matching subscribers.

Link copied to clipboard

No matching subscription existed for the topic filter in the UNSUBSCRIBE.

Link copied to clipboard

Continue the authentication with another step.

Link copied to clipboard

Initiate a re-authentication.

Link copied to clipboard

The server or client does not wish to reveal the reason for the failure.

Link copied to clipboard

Data within the packet could not be correctly parsed.

Link copied to clipboard

Data in the packet does not conform to this specification.

Link copied to clipboard

The packet is valid but not accepted by the implementation.

Link copied to clipboard

The server does not support the requested MQTT protocol version.

Link copied to clipboard

The Client Identifier is not valid.

Link copied to clipboard

The server does not accept the user name or password.

Link copied to clipboard

The client is not authorized to perform this operation.

Link copied to clipboard

The MQTT server is not available.

Link copied to clipboard

The server is busy; try again later.

Link copied to clipboard

The client has been banned by administrative action.

Link copied to clipboard

The server is shutting down.

Link copied to clipboard

The authentication method is not supported or does not match the current method.

Link copied to clipboard

The connection is closed because no packet has been received within 1.5 times the keep alive.

Link copied to clipboard

Another connection using the same Client Identifier has connected.

Link copied to clipboard

The topic filter is correctly formed but not accepted by the server.

Link copied to clipboard

The topic name is correctly formed but not accepted by the server or client.

Link copied to clipboard

The specified packet identifier is already in use.

Link copied to clipboard

The packet identifier is not known (e.g., not part of an active QoS 2 flow).

Link copied to clipboard

The client or server has received more than Receive Maximum concurrent QoS 1/2 messages.

Link copied to clipboard

The topic alias is not valid.

Link copied to clipboard

The packet exceeded the maximum permissible size.

Link copied to clipboard

The received data rate is too high.

Link copied to clipboard

An implementation or administrative imposed limit has been exceeded.

Link copied to clipboard

The connection is closed due to an administrative action.

Link copied to clipboard

The payload format does not match the specified Payload Format Indicator.

Link copied to clipboard

The server does not support retained messages.

Link copied to clipboard

The server does not support the requested QoS level.

Link copied to clipboard

The client should temporarily use another server.

Link copied to clipboard

The client should permanently use another server.

Link copied to clipboard

The server does not support shared subscriptions.

Link copied to clipboard

The connection rate limit has been exceeded.

Link copied to clipboard

The maximum connection time authorized for this connection has been exceeded.

Link copied to clipboard

The server does not support subscription identifiers.

Link copied to clipboard

The server does not support wildcard subscriptions.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int
Link copied to clipboard
val value: Int

The single-byte reason code value as defined in the MQTT 5.0 specification.

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.