def _publish(self, channel, msg):
    self._declare(channel)
    channel.basic_publish(exchange=self._exchange, routing_key=self._routing_key, body=msg, properties=pika.BasicProperties(delivery_mode=2))
def _publish(self, channel, msg):
    self._declare(channel)
    channel.basic_publish(exchange=self._exchange, routing_key=self._routing_key, body=msg, properties=pika.BasicProperties(delivery_mode=2))