Closed JimmyPruitt closed 6 years ago
I figured it out. The messageObject
also has a function called reject
, to be used instead:
q.subscribe({ack: true}, (message, headers, info, messageObject) => {
messageObject.reject(true) // Will put the message back into the queue
})
How can I requeue an acknowledged message using the 4th argument in a queue's
subscribe
callback? i.e.,acknowledge
doesn't appear to accept a second argument like queue.shift, somessageObject.acknowledge(true, true)
doesn't work. Addingrequeue: true
to the subscription options doesn't work either:The documentation says not to call
shift
explicitly, so is there another way to accomplish this?Thanks.