diff --git a/lib/amqp/Subscription.js b/lib/amqp/Subscription.js index 5aa7c6b..d7cdfc7 100644 --- a/lib/amqp/Subscription.js +++ b/lib/amqp/Subscription.js @@ -95,9 +95,10 @@ function Subscription(broker, vhost, subscriptionConfig, counter) { session._incrementUnacknowledgeMessageCount(message.fields.consumerTag); decorateWithRoutingHeaders(message); - if (immediateNack(message)) return { + if (immediateNack(message)) { debug('Immediately nacking message: %s from queue: %s', message.properties.messageId, config.queue); ackOrNack(session, message, true); + return; } decorateWithRedeliveries(message, (err) => {