@thecolvinco/nodejs-amqplib
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -66,3 +66,4 @@ import { connect } from 'amqplib'; | ||
maxRetries = 5, | ||
delay = 5000 | ||
delay = 5000, | ||
onRejected | ||
}) { | ||
@@ -96,2 +97,3 @@ try { | ||
} else { | ||
if (typeof onRejected === 'function') onRejected(message); | ||
channel.nack(message, false, false); | ||
@@ -98,0 +100,0 @@ } |
@@ -66,3 +66,4 @@ var amqplib = require('amqplib'); | ||
maxRetries = 5, | ||
delay = 5000 | ||
delay = 5000, | ||
onRejected | ||
}) { | ||
@@ -96,2 +97,3 @@ try { | ||
} else { | ||
if (typeof onRejected === 'function') onRejected(message); | ||
channel.nack(message, false, false); | ||
@@ -98,0 +100,0 @@ } |
@@ -28,3 +28,4 @@ import { connect } from 'amqplib'; | ||
maxRetries: _maxRetries = 5, | ||
delay: _delay = 5000 | ||
delay: _delay = 5000, | ||
onRejected | ||
}) => { | ||
@@ -52,2 +53,3 @@ const { | ||
} else { | ||
if (typeof onRejected === 'function') onRejected(message); | ||
channel.nack(message, false, false); | ||
@@ -54,0 +56,0 @@ } |
@@ -69,3 +69,4 @@ (function (global, factory) { | ||
maxRetries = 5, | ||
delay = 5000 | ||
delay = 5000, | ||
onRejected | ||
}) { | ||
@@ -99,2 +100,3 @@ try { | ||
} else { | ||
if (typeof onRejected === 'function') onRejected(message); | ||
channel.nack(message, false, false); | ||
@@ -101,0 +103,0 @@ } |
import { retryable } from '../types'; | ||
declare const _default: ({ channel, message, queue, retryExchange, maxRetries, delay, }: retryable) => Promise<void>; | ||
declare const _default: ({ channel, message, queue, retryExchange, maxRetries, delay, onRejected, }: retryable) => Promise<void>; | ||
export default _default; |
{ | ||
"name": "@thecolvinco/nodejs-amqplib", | ||
"description": "RabbitMQ abstraction with some utils", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"source": "src/main.ts", | ||
@@ -6,0 +6,0 @@ "main": "dist/main.umd.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
73546
899