RabbitMQ delivery acknowledgement on channel 1 timed out.

869 views
Skip to first unread message

Bhanoday Naidu

unread,
Oct 30, 2023, 6:17:26 PM10/30/23
to rabbitmq-users
Hello All, 

Recently from my application I am getting this error:

System.InvalidOperationException: The channel was closed: AMQP close-reason, initiated by Peer, code=406, text='PRECONDITION_FAILED - delivery acknowledgement on channel 1 timed out. Timeout value used: 1800000 ms. This timeout value can be configured, see consumers doc guide to learn more', classId=0, methodId=0 1
   at MassTransit.RabbitMqTransport.RabbitMqReceiveLockContext.Complete() in /_/src/Transports/MassTransit.RabbitMqTransport/RabbitMqTransport/RabbitMqReceiveLockContext.cs:line 30
   at MassTransit.Transports.PendingReceiveLockContext.Execute(Func`2 action) in /_/src/MassTransit/Transports/PendingReceiveLockContext.cs:line 83
   at MassTransit.Transports.ReceivePipeDispatcher.Dispatch(ReceiveContext context, ReceiveLockContext receiveLock) in /_/src/MassTransit/Transports/ReceivePipeDispatcher.cs:line 71
   at MassTransit.Transports.ReceivePipeDispatcher.Dispatch(ReceiveContext context, ReceiveLockContext receiveLock) in /_/src/MassTransit/Transports/ReceivePipeDispatcher.cs:line 108
   at MassTransit.Transports.ReceivePipeDispatcher.Dispatch(ReceiveContext context, ReceiveLockContext receiveLock) in /_/src/MassTransit/Transports/ReceivePipeDispatcher.cs:line 115
   at MassTransit.RabbitMqTransport.RabbitMqBasicConsumer.<>c__DisplayClass21_0.<<HandleBasicDeliver>b__0>d.MoveNext() in /_/src/Transports/MassTransit.RabbitMqTransport/RabbitMqTransport/RabbitMqBasicConsumer.cs:line 168



I was using rabbitmq 3.11.11 , after seeing the documentation i figured out that we can do per-queue delivery timeouts using a policy so i upgraded to Rabbitmq latest version (i.e 3.12.7). 

According to the documentation I was told to do this 
# override consumer timeout for a group of queues using a policy rabbitmqctl set_policy queue_consumer_timeout "with_delivery_timeout\.*" '{"consumer_timeout":3600000}' --apply-to classic_queues
so this is my command :-
rabbitmqctl set_policy queue_consumer_timeout "^GemcatCleaning$" "{\"consumer_timeout\":7200000}" --apply-to classic_queues

when trying this i am getting the error:-
Setting policy "queue_consumer_timeout" for pattern "^GemcatCleaning$" to "{"consumer_timeout":7200000}" with priority "0" for vhost "/" ...
Error:
Validation failed

[{<<"consumer_timeout">>,3600000}] are not recognised policy settings

Can you provide me any workaround or solution to increase my delivery ack timeout from 30 mins to 2 hrs for that particular queue????

Thanks
Bhanoday

Michal Kuratczyk

unread,
Oct 31, 2023, 4:21:03 AM10/31/23
to rabbitm...@googlegroups.com
Typo in the docs, the policy key is "consumer-timeout" (hyphen, not an underscore).
I've corrected the docs.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/41d8fa6a-bad4-4c0d-92f5-1d0dd7d786a5n%40googlegroups.com.


--
Michał
RabbitMQ team
Reply all
Reply to author
Forward
0 new messages