Node.js beanstalkd RPC
A slim and simple beanstalkd based RPC client for node, based on fivebeans. https://github.com/ceejbot/fivebeans
Produce jobs
client.put(tube, payload, successCallback function(err, jobid) {}, replyCallback function(payload) {}, priority, delay, ttr)
successCallback
fires when the payload has been sent.replyCallback
fires when a reply payload is received.
var bRPC = client = 'localhost' 11300; client;
Consume jobs
client.reserve(tube, successCallback function(payload, reply) {})
successCallback
fires when a payload has been reserved from the queue.reply
is a function used to report progress or mark the job as being finished. With an optional payload as argument.
var bRPC = client = 'localhost' 11300; client