def publishToExchange(self, exchangeName, routingKey, msg):
try:
self._channel.basic_publish(exchange=exchangeName, routing_key=routingKey, body=msg)
except pika.exceptions.AMQPError as e:
raise PipelineQueueError("Couldn't push message to exchange: {reason}".format(reason=e))
评论列表
文章目录