def publish(self, sender, destination, message):
    '\n        Publish message\n\n        :param sender: Message sender\n        :param destination: Message destination\n        :param message: The message\n        '
    id = self.__message_number
    self.__message_number = ((self.__message_number + 1) % 65536)
    out_message = ((b'\x01' + id.to_bytes(2, 'big')) + message)
    logging.info('Publishing {0} to topic {1}'.format(message, destination))
    self.__connection.publish(sender, destination, out_message)
    self.__sent_messages[id] = {self._SENDER: sender, self._DESTINATION: destination, self._MESSAGE: message}
    _thread.start_new_thread(self._republish, (id,))
Publish message

:param sender: Message sender
:param destination: Message destination
:param message: The message
def publish(self, sender, destination, message):
    '\n        Publish message\n\n        :param sender: Message sender\n        :param destination: Message destination\n        :param message: The message\n        '
    id = self.__message_number
    self.__message_number = ((self.__message_number + 1) % 65536)
    out_message = ((b'\x01' + id.to_bytes(2, 'big')) + message)
    logging.info('Publishing {0} to topic {1}'.format(message, destination))
    self.__connection.publish(sender, destination, out_message)
    self.__sent_messages[id] = {self._SENDER: sender, self._DESTINATION: destination, self._MESSAGE: message}
    _thread.start_new_thread(self._republish, (id,))