0

I am using RabbitMQ to communicate long running process status changes to Web Server. The Application Server will publish events to a queue for and Web Server will consume those events.

The queues are temporary(x-expires: 300000, auto-delete: true) and are initiated when the Web Application starts for the first time.

The problem I am facing is that the queue dies out periodically. I figured out one issue was related to RequestedHeartbeat setting. Since we had some long running task on web server as well, the queue was dying periodically. After i increased its value the long running task on web works fine.

However, the queue still dies periodically. The Rabbit MQ has an ever increasing log file with following errors. Some of these errors are from other environment dev/staging/uat but same errors

2020-04-30 01:16:15.218 [error] <0.3578.286> Channel error on connection <0.30037.285> (10.10.122.111:25734 -> 10.10.234.111:5672, vhost: '/', user: 'someuser'), 
channel 5: operation basic.consume caused a channel exception not_found: no queue 'QueueNo132321011360' in vhost '/'

Also, 1) How do I detect the temporary queue has died?

2) What is the best mechanism to renew temporary queue from Web Server?

kapd
  • 639
  • 1
  • 7
  • 20
  • RabbitMQ queue never get's deleted even you set ```auto-delete:true``` as long as there is consumer. Queue will only auto-delete if there are no more consumer. Therefore check your consumer if at some point it stops consuming from that queue or at certain point disconnects from your Rabbit server somehow. – mr.b Apr 30 '20 at 06:31
  • @mr.b Thank you for the response. The consumer is a Web Server and we are using EasyNetQ to connect to Rabbitmq. Any pointers what I can possibly check. – kapd Apr 30 '20 at 06:43
  • 1
    Im not sure why exactly you want to auto-delete queue but why not make the queue durable? https://www.rabbitmq.com/queues.html – mr.b Apr 30 '20 at 06:53
  • Thank you, that is actually a good point. I am not sure what exactly was the reason as someone else developed it but will look at that option.. – kapd Apr 30 '20 at 07:02

1 Answers1

1

If would recommend keeping x-expires but change auto-delete to false, so your queues survive temporary disconnects of the clients (unless you don't care about losing messages of course).

Wiebe Tijsma
  • 10,173
  • 5
  • 52
  • 68