int myqtt_msg_get_id ( MyQttMsg msg)

Allows to get the unique msg identifier for the given msg.

Inside MyQtt Library, every msg created is flagged with an unique msg identifier which is not part of the MQTT protocol.

This unique identifiers was created for the internal MyQtt Library support but, it has become a useful mechanism to have msgs identified.

MyQtt Library will ensure, as long as the process is in memory, that every unique identifier returned/generated for a msg will be unique.

msgThe msg where the unique identifier value will be get.
Returns the unique msg identifier or -1 if it fails. The only way for this function to fail is to receive a NULL value.