squaremo/rabbit.js — Issue #4: Can you provide an example of simple Node.JS consumer
Author: wtfcoder
Created: 2011-11-04 04:15:36+00:00
State: open

Can you provide an example of simple consumer in Node.JS that consumes a message from a queue and replies with confirmation to the replyTo queue specified in the message headers, or is this mainly intended for browsers?

pseudo code for consume:

receive message from queue
do something
print "got message"
acknowledge message
if message.replyToQueue
exchange.publish(message.replyToQueue, { status: 'yeah-ok'. }