Last active
April 12, 2017 20:02
-
-
Save jordancardwell/b50ccc2354c083988efd59482c7b8826 to your computer and use it in GitHub Desktop.
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 characters
var appname = 'test.event.1' | |
var bus1 = require('servicebus').bus(); | |
bus1.subscribe(appname, function (event) { | |
console.log(`1 caught ${event.counter}`); | |
}); | |
var bus2 = require('servicebus').bus(); | |
bus2.subscribe(appname, function (event) { | |
console.log(`2 caught ${event.counter}`); | |
}); | |
var bus3 = require('servicebus').bus(); | |
var counter = 0; | |
setInterval(function () { | |
bus3.publish(appname, { counter }); | |
counter++; | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment