Share via


MqttConnectEventErrorResponseProperties Class

Definition

Represents the properties of an MQTT connection failure response.

[System.Runtime.Serialization.DataContract]
public class MqttConnectEventErrorResponseProperties
[<System.Runtime.Serialization.DataContract>]
type MqttConnectEventErrorResponseProperties = class
Public Class MqttConnectEventErrorResponseProperties
Inheritance
MqttConnectEventErrorResponseProperties
Attributes

Constructors

MqttConnectEventErrorResponseProperties(MqttV311ConnectReturnCode)

Creates a new instance of MqttConnectEventErrorResponseProperties.

MqttConnectEventErrorResponseProperties(MqttV500ConnectReasonCode)

Creates a new instance of MqttConnectEventErrorResponseProperties.

Properties

Code

The failure code. It will be sent to the clients in the CONNACK packet as a return code (MQTT 3.1.1) or reason code (MQTT 5.0). Upstream webhook should select a valid integer value defined the MQTT protocols according to the protocol versions of the clients. If Upstream webhook sets an invalid value, clients will receive "unspecified error" in the CONNACK packet.

Reason

The reason for the failure. It's a human readable failure reason string designed for diagnostics. It will be sent to those clients whose protocols support reason string in the CONNACK packet. Now only MQTT 5.0 supports it.

UserProperties

The user properties in the response.

Applies to