code: def __on_message(self, client, userdata, msg):
          # pylint: disable=W0613
          
          # Notify the caller, if any
          if self.on_message is not None:
              try:
                  self.on_message(self, msg)
              except Exception as ex:
                  _logger.exception("Error notifying MQTT listener: %s", ex)
docs: A message has been received from a server
  
          :param client: Client that received the message
          :param userdata: User data (unused)
          :param msg: A MQTTMessage bean