eandersson / amqpstorm

Thread-safe Python RabbitMQ Client & Management library
https://www.amqpstorm.io/
MIT License
186 stars 36 forks source link

Consumer Delivery Acknowledgement Timeout #126

Closed madhur-df closed 1 year ago

madhur-df commented 1 year ago

Hi, according to https://www.rabbitmq.com/consumers.html#acknowledgement-timeout

I setup my x-consumer-timeout as 60000 i.e. 1 minute (in milliseconds)

And I simulated sending a message that takes 5 minutes to complete. However, I don't get any error for closing of the channel and processing still continues.

This should have ideally worked I guess?

madhur-df commented 1 year ago

I am kinda using the Scalable Consumer pattern here: https://github.com/eandersson/amqpstorm/blob/2.x/examples/scalable_consumer.py#L141

madhur-df commented 1 year ago

On a 2nd note, it does occur but only at the end of 5 mins, which kinda defeats the purpose.

madhur-df commented 1 year ago

I have managed to fix it. The key is to add the following statement after start_consuming

self.channel.start_consuming(auto_decode=False)
self.channel.check_for_errors()