def send_event(self, event, routing_key):
with Connection(self._url) as connection:
producer = Producer(connection, exchange=BUS_EXCHANGE_XIVO, auto_declare=True)
producer.publish(json.dumps(event), routing_key=routing_key, content_type='application/json')
评论列表
文章目录