Skip to content

Instantly share code, notes, and snippets.

@kuno
Created April 8, 2013 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuno/5335137 to your computer and use it in GitHub Desktop.
Save kuno/5335137 to your computer and use it in GitHub Desktop.
var amqp = require('amqp');
var connection = amqp.createConnection({ host: '127.0.0.1' });
// Wait for connection to become established.
connection.on('ready', function () {
console.log('connection ready');
//
connection.exchange('devops', {}, function(exchange) {
console.log('exchange ready');
console.log(exchange.name);
while (true) {
exchange.publish('log', {from:'test'});
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment