IPWorks IoT 2020 JavaScript Edition

Questions / Feedback?

WillMessage Property

The message that the server should publish in the event of an ungraceful disconnection.

Syntax


 getWillMessage(): string;

 setWillMessage(willMessage: string): void;

Default Value

""

Remarks

This property may be set before calling Connect to specify to the server a message that should be published on WillTopic if the connection is closed ungracefully or lost.

The WillMessage will only be sent to the server when Connect is called if WillTopic is set. Note that in MQTTSN the clean session concept is extended to will topic and will message. The WillMessage can be updated with the UpdateWillMessage method.

Refer to WillTopic for more information about MQTT Will functionality.

This property is not available at design time.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 JavaScript Edition - Version 20.0 [Build 8265]