Skip to content

Instantly share code, notes, and snippets.

@liorkesos
Created July 3, 2016 11:50
Show Gist options
  • Save liorkesos/75010b78c1c6a5e34e25ab9f3b4b5dd4 to your computer and use it in GitHub Desktop.
Save liorkesos/75010b78c1c6a5e34e25ab9f3b4b5dd4 to your computer and use it in GitHub Desktop.
Node-busmq producer
var Bus = require('busmq');
var bus = Bus.create({redis: ['redis://127.0.0.1:6379']});
bus.on('online', function() {
var q = bus.queue('foo');
q.on('attached', function() {
console.log('attached to queue');
});
q.attach();
q.push({hello: 'world'});
q.push('my name if foo');
});
bus.connect();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment