postwait / node-amqp

[UNMAINTAINED] node-amqp is an AMQP client for nodejs
MIT License
1.69k stars 357 forks source link

question about consumer timeouts #360

Open podviaznikov opened 9 years ago

podviaznikov commented 9 years ago

I'm still pretty new to RabbitMQ so not sure if it's something obvious I'm missing from the docs.

For now it seems that after consumer takes message out of the queue it can work on it infinitely.

Is it possible to specify maximum time consumer should spend on each message (and remove message from the queue after the timeout)?

Is it implemented somewhere in RabbitMQ, this library or it should be implemented directly in my code?

xaka commented 9 years ago

It's implemented as RabbitMQ's extension:

  1. https://www.rabbitmq.com/dlx.html
  2. http://globaldev.co.uk/2014/07/back-off-and-retry-with-rabbitmq/