Retry failed attempts to consume a message, with increasing delays between each attempt.
$ npm install amqplib-retry --save
var Promise =var amqplib =var retry =var CONSUMER_QUEUE = 'example-queue'var FAILURE_QUEUE = 'example-queue.failure'Promise
channel (required): Amqplib channel. See: connection.createChannel()
consumerQueue (required): Name of the queue that holds the amqp messages that need to be processed.
delay (optional): Delay in milliseconds between retries. Default:
Math.pow(2, <# of attempts>)
failureQueue (optional): Name of the queue that holds the amqp messages that could not be processed in spite of the retries. Default:
handler (required): Set up a consumer with a callback to be invoked with each message.