postwait / node-amqp

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

Updated docs to show how to ack messages when using queue.subscribe() and prefetchCount #263

Closed fjohnson closed 10 years ago

aheckmann commented 10 years ago

we just ran into this issue as well. the docs need to be updated as described.

gjohnson commented 10 years ago

It should be: "Instead the listener function should take four parameters (data, headers, deliveryInfo, msg) and msg.acknowledge() should be called to ack a single message."

The data is the first argument and msg is the fourth argument.

https://github.com/postwait/node-amqp/blob/master/lib/queue.js#L190