Megosztás a következőn keresztül:


IotHubClientMqttSettings.WillMessage Property

Definition

The configured will message that is sent to the telemetry channel on an ungraceful disconnect.

public Microsoft.Azure.Devices.Client.IWillMessage WillMessage { get; set; }
member this.WillMessage : Microsoft.Azure.Devices.Client.IWillMessage with get, set
Public Property WillMessage As IWillMessage

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