Browse Source

Add a message id to the received messages

master
Dirk Alders 6 months ago
parent
commit
14e56ccdbf
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      __init__.py

+ 1
- 0
__init__.py View File

88
         logger.warning("Disconnect with rc=%s", repr(rc))
88
         logger.warning("Disconnect with rc=%s", repr(rc))
89
 
89
 
90
     def __receive__(self, client, userdata, message):
90
     def __receive__(self, client, userdata, message):
91
+        message.mid = self.__client__._mid_generate()	# add a message id to the received message
91
         get_topic_logger(message.topic).debug("Received message with topic %s and payload %s", message.topic, str(message.payload))
92
         get_topic_logger(message.topic).debug("Received message with topic %s and payload %s", message.topic, str(message.payload))
92
         for topic in self.__callbacks__.copy():
93
         for topic in self.__callbacks__.copy():
93
             if topic.endswith('#'):
94
             if topic.endswith('#'):

Loading…
Cancel
Save