fh-amqp-js
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -111,2 +111,23 @@ var amqp = require('amqp'); | ||
// Subscribe to Tasks | ||
// 'subscribeFunc' is the function that gets called each time a message happens | ||
this.subscribeToTasks = function(exchangeName, qName, filter, subscribeFunc, opts, callback) { | ||
if (!callback) { | ||
callback = opts; | ||
opts = undefined; | ||
} | ||
// If no opts passed, create a durable Q by default. | ||
if (!opts) { | ||
opts = { | ||
autoDelete: false, | ||
durable: true | ||
}; | ||
} | ||
_connection.queue(qName, opts, function(q) { | ||
q.subscribe({ack: true}, subscribeFunc); | ||
callback(); | ||
}); | ||
}; | ||
// cleanly disconnect from the Cluster | ||
@@ -113,0 +134,0 @@ this.disconnect = function(){ |
{ | ||
"name": "fh-amqp-js", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "FeedHenry AMQP Client", | ||
@@ -5,0 +5,0 @@ "main": "./lib/amqpjs.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23922
469