amqp-retry

0.0.7 • Public • Published

node-amqp-retry

Retry failed jobs, with exponential backoff (or custom) strategy.

Install

npm install amqp-retry

Usage

Old code, without retry logic

queue.subscribe(options, handler);

New, smart code

var retry = require('amqp-retry');
queue.subscribe(options, retry(initialDelay, limit, handler));

If handler throws an error, the message will be requeued with some delay (uses amqp-schedule internally). You can explicitly requeue the job with job.retry(). See examples for details.

Readme

Keywords

none

Package Sidebar

Install

npm i amqp-retry

Weekly Downloads

3

Version

0.0.7

License

MIT

Last publish

Collaborators

  • lennon