Enumeration DisconnectReasonCode

Reason code inside DISCONNECT packets. Helps determine why a connection was terminated.

Enum values match MQTT5 spec encoding values.

Enumeration Members

AdministrativeAction: 152

Returned when the connection was closed due to an administrative action.

May be sent by the client or the server.

ConnectionRateExceeded: 159

Returned when the server disconnects the client due to the connection rate being too high.

May only be sent by the server.

DisconnectWithWillMessage: 4

Returns that the client wants to disconnect but requires that the server publish the Will message configured on the connection.

May only be sent by the client.

ImplementationSpecificError: 131

Returned when a valid packet was received by the remote endpoint, but could not be processed by the current implementation.

May be sent by the client or the server.

KeepAliveTimeout: 141

Returned when the server closes the connection because no packet from the client has been received in 1.5 times the KeepAlive time set when the connection was established.

May only be sent by the server.

MalformedPacket: 129

Indicates the remote endpoint received a packet that does not conform to the MQTT specification.

May be sent by the client or the server.

MaximumConnectTime: 160

Returned by the server when the maximum connection time authorized for the connection was exceeded.

May only be sent by the server.

MessageRateTooHigh: 150

Returned when the remote endpoint's incoming data rate was too high.

May be sent by the client or the server.

NormalDisconnection: 0

Returned when the remote endpoint wishes to disconnect normally. Will not trigger the publish of a Will message if a Will message was configured on the connection.

May be sent by the client or server.

NotAuthorized: 135

Returned when the remote endpoint received a packet that represented an operation that was not authorized within the current connection.

May only be sent by the server.

PacketTooLarge: 149

Returned when the remote endpoint received a packet whose size was greater than the maximum packet size limit it established for itself when the connection was opened.

May be sent by the client or the server.

PayloadFormatInvalid: 153

Returned when the remote endpoint received a packet where payload format did not match the format specified by the payload format indicator.

May be sent by the client or the server.

ProtocolError: 130

Returned when an unexpected or out-of-order packet was received by the remote endpoint.

May be sent by the client or the server.

QosNotSupported: 155

Returned when the client sends a QOS that is greater than the maximum QOS established when the connection was opened.

May only be sent by the server.

QuotaExceeded: 151

Returned when an internal quota of the remote endpoint was exceeded.

May be sent by the client or the server.

ReceiveMaximumExceeded: 147

Returned when the remote endpoint reached a state where there were more in-progress QoS1+ publishes then the limit it established for itself when the connection was opened.

May be sent by the client or the server.

RetainNotSupported: 154

Returned when the server does not support retained messages.

May only be sent by the server.

ServerBusy: 137

Returned when the server is busy and cannot continue processing packets from the client.

May only be sent by the server.

ServerMoved: 157

Returned by the server to tell the client to permanently use a different server.

May only be sent by the server.

ServerShuttingDown: 139

Returned when the server is shutting down.

May only be sent by the server.

SessionTakenOver: 142

Returned when the server has established another connection with the same client ID as a client's current connection, causing the current client to become disconnected.

May only be sent by the server.

SharedSubscriptionsNotSupported: 158

Returned by the server to tell the client that shared subscriptions are not supported on the server.

May only be sent by the server.

SubscriptionIdentifiersNotSupported: 161

Returned by the server when it received a SUBSCRIBE packet with a subscription identifier, but the server does not support subscription identifiers.

May only be sent by the server.

TopicAliasInvalid: 148

Returned when the remote endpoint receives a PUBLISH packet that contained a topic alias greater than the maximum topic alias limit that it established for itself when the connection was opened.

May be sent by the client or the server.

TopicFilterInvalid: 143

Returned when the topic filter name is correctly formed but not accepted by the server.

May only be sent by the server.

TopicNameInvalid: 144

Returned when topic name is correctly formed, but is not accepted.

May be sent by the client or the server.

UnspecifiedError: 128

Returned when the connection was closed but the sender does not want to specify a reason or none of the other reason codes apply.

May be sent by the client or the server.

UseAnotherServer: 156

Returned by the server to tell the client to temporarily use a different server.

May only be sent by the server.

WildcardSubscriptionsNotSupported: 162

Returned by the server when it received a SUBSCRIBE packet with a wildcard topic filter, but the server does not support wildcard topic filters.

May only be sent by the server.

Generated using TypeDoc