-
Notifications
You must be signed in to change notification settings - Fork 0
Azure service bus
This article explains how to use the Windows Azure Service Bus backplane for SignalR.
## Setup ## ### Service Bus Setup ###You'll need to create a Service Bus using the Windows Azure management portal.
### Setting up NuGet References ###Install the SignalR libraries using NuGet:
Install-Package -pre Microsoft.AspNet.SignalR
Install the SignalR.WindowsAzureServiceBus package using NuGet:
Install-Package -pre Microsoft.AspNet.SignalR.ServiceBus
using System;
using Microsoft.AspNet.SignalR;
namespace WindowsAzureServiceBusBackedSignalR
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
string connectionString = "";
GlobalHost.DependencyResolver.UseWindowsAzureServiceBus(connectionString, 1);
}
}
}Note, this web site is an ASP.NET site that runs in an Azure web role. As of 1.0alpha2 there are some bugs in AzureWebSites due to which ServiceBus Scale out scenarios do not work well. We are working on resolving this for the future
### What to Expect ### When the site runs and SignalR messages are transmitted, new topics will appear in the Windows Azure administration panel. Subscriptions also appear, that reflect the name of the client machine connecting to the Service Bus to use it in the SignalR transmission.To increase the number of topics used by the Service Bus (and therefore increase throughput and performance), increase the numberOfTopics parameter. This will result in more topics being created in the Service Bus namespace.