IPWorks MQ 2020 Python Edition

Questions / Feedback?

client_id Property

A string that uniquely identifies this instance of the class to the server.

Syntax

def get_client_id() -> str: ...
def set_client_id(value: str) -> None: ...

client_id = property(get_client_id, set_client_id)

Default Value

""

Remarks

The client_id string is used by the server to uniquely identify each client that is connected to it. In MQTT 5, when the SessionExpInterval config is set to a positive value, the server will also associate it with any session state data that needs to be saved for the length of time specified when the class is disconnected.

If client_id is empty when connect is called, the class's behavior depends on value of clean_session. If clean_session is True, the class will automatically generate a unique value for client_id before connecting. If clean_session is False, the class fails with an error.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks MQ 2020 Python Edition - Version 20.0 [Build 8162]