squaremo/rabbit.js — pull request #69 by christophermina (2014-08-12 06:59:15+00:00)
Title: Added requeue and discard functionality to socket

Per issue #65: https://github.com/squaremo/rabbit.js/issues/65, I've created two new methods, requeue and discard, on the Request/Reply and Push/Worker sockets.

Requeue calls the amqp#nack() method with only the msg argument, in amqp, requeue is defaulted to true.

Discard calls the amqp#reject method, with a requeue flag set explicitly to false.

Method methods remove the current message from the unacked queue to enable the sequence to continue.