postwait / node-amqp

[UNMAINTAINED] node-amqp is an AMQP client for nodejs
MIT License
1.69k stars 357 forks source link

Cannot reject and discard messages that cause type errors #405

Open renewooller opened 8 years ago

renewooller commented 8 years ago

I'm getting errors such as:

[Error: Unknown field value type 115]

and

[TypeError: First argument needs to be a number, array or string.]

The default behaviour is to requeue the message. eg basic.reject(true)

However, this causes to queue to backlog.

It would be great to be able to specify the behaviour of basic.reject(false) where the message is not requeued, but dead-lettered instead.