public static void UseSignalRBackplane(
     this IDependencyResolver resolver,
     SignalRBackplaneConfiguration configuration)
 {
     resolver.Register(
         typeof(IMessageBus),
         () => new SignalRBackplaneMessageBus(
             resolver,
             configuration));
 }
        public SignalRBackplaneMessageBus(IDependencyResolver dependencyResolver,
        SignalRBackplaneConfiguration configuration)
            : base(dependencyResolver, configuration)
        {
            _connection = new HubConnection(
            configuration.EndpointAddress);

            _hub = _connection.CreateHubProxy("backplane");

            _hub.On<byte[]>("Broadcast", m =>
            {
                var message = SignalRBackplaneMessage.FromBytes(m);
                OnReceived(0,
                message.Id, message.ScaleoutMessage);
            });

            _connection.Start().Wait();
        }