will_message Property
The message that the server should publish in the event of an ungraceful disconnection.
Syntax
def get_will_message() -> str: ... def set_will_message(value: str) -> None: ...
will_message = property(get_will_message, set_will_message)
Default Value
""
Remarks
This property may be set before calling connect to specify to the server a message that should be published on will_topic if the connection is closed ungracefully. Since it is sent to the server when connect is called, this property's value cannot be changed when already connected.
Note that the will_message will only be sent to the server when connect is called if will_topic is set.
Refer to will_topic for more information about MQTT Will functionality.