Last active
August 29, 2015 13:57
Revisions
-
DarcInc revised this gist
Mar 19, 2014 . No changes.There are no files selected for viewing
-
DarcInc revised this gist
Mar 19, 2014 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,6 @@ var queueName = 'tasks'; var amq = require('amq'); var connection = amq.createConnection( { host: 'localhost', debug: true }, -
DarcInc created this gist
Mar 19, 2014 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ var queueName = 'tasks'; var amq = require('amq'); var server = amqp.connect("amqp://localhost"); var connection = amq.createConnection( { host: 'localhost', debug: true }, { reconnect: { strategy: 'constant', initial: 1000 } } ); var queue = connection.queue(queueName, { durable: true }); queue.consume(function(message) { console.log(message.content.toString()); queue.ack(message); }).then(null, console.warn);