abreits / amqp-ts

AmqpSimple, a RabbitMQ tested Amqp library written in and for Typescript
MIT License
133 stars 37 forks source link

nack(false) still requeues, nack needs allUpTo parameter #14

Closed Sammons closed 8 years ago

Sammons commented 8 years ago

I ran into a delivery loop (event always failed, always redelivered), and found out that allUpTo is false when I pass false to nack, but requeue isn't being passed through. http://www.squaremobius.net/amqp.node/channel_api.html#channel_nack

This is the suspect line, when I added false as the second parameter, the problem went away https://github.com/abreits/amqp-ts/blob/master/src/amqp-ts.ts#L393

in the mean time we are using ack instead to deal with this.

abreits commented 8 years ago

Thank you for reporting this bug, I have fixed it (version 1.1.0). I have added the allUpTo parameter to the nack method, so it now correctly passes the parameters to the amqplib nack.

Sammons commented 8 years ago

Thank you!