Setting connection_timeout on a per-queue and per-consumer basis

306 views
Skip to first unread message

Nathan Voss

unread,
May 18, 2023, 7:52:29 PM5/18/23
to Pika
According to the official RabbitMQ docs:

Starting with RabbitMQ 3.11.15, the timeout value can also be set on the per-queue and per-consumer basis.

It would be great if this functionality was exposed via the Pika library, perhaps as new 'consumer_timeout' arguments on the channel and queue-creation functions. 

This would allow simpler and more flexible means of handling messages that take a long time to process, as by default there is a server-wide limit set to 30 minutes, after which a consumer connection is forcefully severed.

Luke Bakken

unread,
May 19, 2023, 10:56:11 AM5/19/23
to Pika
Hello,

This is already supported by Pika by setting the  x-consumer-timeout argument when you declare your queue (the arguments parameter of queue_declare), or when you start your consumer (the arguments parameter of basic_consume).

Thanks,
Luke
Reply all
Reply to author
Forward
0 new messages