Handling long running tasks in pika / RabbitMQ

For now, your best bet is to turn off heartbeats, this will keep RabbitMQ from closing the connection if you’re blocking for too long. I am experimenting with pika’s core connection management and IO loop running in a background thread but it’s not stable enough to release.

In pika v1.1.0 this is ConnectionParameters(heartbeat=0)

Leave a Comment