MqttTransportSettings.HasWill Property

Definition

Indicates whether the transport has a will message.

public bool HasWill { get; set; }
member this.HasWill : bool with get, set
Public Property HasWill As Boolean

Property Value

Remarks

Setting a will message is a way for clients to notify other subscribed clients about ungraceful disconnects in an appropriate way. In response to the ungraceful disconnect, the service will send the last-will message to the configured telemetry channel. The telemetry channel can be either the default Events endpoint or a custom endpoint defined by IoT hub routing. For more details, refer to https://docs.microsoft.com/azure/iot-hub/iot-hub-mqtt-support#using-the-mqtt-protocol-directly-as-a-device.

Applies to