Skip to content

Instantly share code, notes, and snippets.

@ntotten
Last active December 15, 2015 20:49
Show Gist options
  • Save ntotten/5321304 to your computer and use it in GitHub Desktop.
Save ntotten/5321304 to your computer and use it in GitHub Desktop.
Scaling Out Socket.IO with Windows Azure Service Bus
// Setup the Service Bus store for Socket.IO
var sbstore = require('socket.io-servicebus');
io.configure(function () {
io.set("transports", ["xhr-polling"]);
io.set("polling duration", 30);
io.set('store', new sbstore({
topic: nconf.get("SERVICE_BUS_TOPIC"),
connectionString: nconf.get("CUSTOMCONNSTR_SERVICEBUS"),
logger: io.get('logger')
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment