Skip to content
NServiceBus backplane for SignalR
JavaScript C# HTML
Branch: master
Clone or download
Roy Cornelissen
Roy Cornelissen A little bit of cleanup.
Latest commit 6f2f351 Dec 5, 2015


NServiceBus backplane for SignalR

To use this backplane in a SignalR host, add a reference to SignalR.NServiceBus, initialize an IBus and configure SignalR to use NServiceBus. In ASP.NET, this would look something like this:

In Startup.cs:

	using Microsoft.AspNet.SignalR;
	using Microsoft.AspNet.SignalR.Messaging;
	using NServiceBus;
	using Owin;

	namespace DemoWebApp
		public class Startup
			public IBus Bus;

			public void Configuration(IAppBuilder app)
				// Any connection or hub wire up and configuration should go here

				Bus = Configure

				var config = new ScaleoutConfiguration() { MaxQueueLength = 100 }; // Or whatever you want
				GlobalHost.DependencyResolver.UseNServiceBus(Bus, config);

The website in the demo project is mapped to local IIS. In order to make this work, you must make sure that the App Pool user has permission to access the queues involved in this sample: all queues starting with signalr.nservicebus.backplaneservice and all queues starting with system.web:

  • signalr.nservicebus.backplaneservice

  • signalr.nservicebus.backplaneservice.retries

  • signalr.nservicebus.backplaneservice.timeouts

  • signalr.nservicebus.backplaneservice.timeoutdispatcher

  • system.web

  • system.web.retries

  • system.web.timeouts

  • system.web.timeoutdispatcher

Also, make sure that you have configured the endpoint of the backplane in the config of your SignalR host:

        <section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core" />
        <section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" />
          <!-- the endpoint on which the backplane is listening for commands -->
          <!-- SignalR will subscribe to new messages via that endpoint -->
          <add Messages="SignalR.NServiceBus" Endpoint="signalr.nservicebus.backplane" />
      <MessageForwardingInCaseOfFaultConfig ErrorQueue="error" />

To run the backplane itself, just start the SignalR.NServiceBus.BackplaneService project (it uses the NServiceBus generic host).


Roy Cornelissen

For more info, see my blogpost

You can’t perform that action at this time.