Handling long running tasks in pika / RabbitMQ

后端 未结 6 567
没有蜡笔的小新
没有蜡笔的小新 2020-12-04 09:26

We\'re trying to set up a basic directed queue system where a producer will generate several tasks and one or more consumers will grab a task at a time, process it, and ackn

6条回答
  •  爱一瞬间的悲伤
    2020-12-04 09:58

    Please don't disable heartbeats!

    As of Pika 0.12.0, please use the technique described in this example code to run your long-running task on a separate thread and then acknowledge the message from that thread.


    NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.

提交回复
热议问题