I have hard times to demonstrate that the consumer_timeout
setting is working as expected.
I may have done things wrong or misunderstood the consumer_timeout behavior.
All my code for testing is available here : https://github.com/Rafarel/rabbitmq-tests
Basically, I have a consumer_timeout
set to 10000ms (10sec) and then I try to consume the message with a call back
that sleeps a bit longer than the timeout value (20sec) before trying to acknowledge the message.
I am supposed to have a PRECONDITION_FAILED exception due to the timeout, but it is not the case.
I have the exception if I set the SLEEP_DURATION
in receive_timeout.py
way more than the consumer_timeout
value like 60 seconds.
Quote from https://www.rabbitmq.com/consumers.html#acknowledgement-timeout
If a consumer does not ack its delivery for more than the timeout value (30 minutes by default), its channel will be closed with a PRECONDITION_FAILED channel exception.
If someone could help me understand what I'm doing wrong that would be great, thanks!