Created
July 3, 2016 11:50
-
-
Save liorkesos/75010b78c1c6a5e34e25ab9f3b4b5dd4 to your computer and use it in GitHub Desktop.
Node-busmq producer
This file contains hidden or 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 characters
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