简体   繁体   English

如何通过共享事件循环将Tornado和Pika与RabbitMQ连接?

[英]How to connect Tornado and Pika with RabbitMQ via a shared event loop?

I'm using the TornadoConnection adapter in Pika, however found the documentation to be light. 我在Pika中使用TornadoConnection适配器,但发现文档很轻。 I'd like: 我想要:

  1. Tornado initiates a Pika producer via a handler Tornado通过处理程序启动了Pika制作人
  2. Pika executes the consumer(s) 皮卡执行消费者
  3. Tornado is notified via callback when the consumption is complete and updates the web client 消费完成后,通过回调通知龙卷风并更新Web客户端

The docs show how to use the Tornado IOLoop but I haven't seen such examples. 文档展示了如何使用Tornado IOLoop,但我还没有看到这样的例子。 Much appreciated. 非常感激。


声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM