protected virtual void ConfigureRemoteBus(IServiceBusConfigurator configurator)
 {
     RemoteUri = new Uri("loopback://localhost/mt_server");
     configurator.ReceiveFrom(RemoteUri);
     configurator.AddSubscriptionObserver((bus, coordinator) =>
     {
         _remoteLoopback = new SubscriptionLoopback(bus, coordinator);
         return(_remoteLoopback);
     });
 }
 protected virtual void ConfigureLocalBus(IServiceBusConfigurator configurator)
 {
     LocalUri = new Uri("loopback://localhost/mt_client");
     configurator.ReceiveFrom(LocalUri);
     configurator.AddSubscriptionObserver((bus, coordinator) =>
     {
         _localLoopback = new SubscriptionLoopback(bus, coordinator);
         return(_localLoopback);
     });
 }
        /// <summary>
        /// Specify the endpoint from which messages should be read
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="uriString">The uri of the endpoint</param>
        /// <param name="subscriptionSource">Action that returns the subscription configurator.</param>
        public static IServiceBusConfigurator Configure(this IServiceBusConfigurator configurator,
                                                        string uriString, Action <ISubscriptionBusServiceConfigurator> subscriptionSource = null)
        {
            configurator.ReceiveFrom(uriString.ToUri("The receive endpoint URI is invalid"));
            configurator.UseRabbitMq();
            configurator.UseControlBus();

            if (subscriptionSource != null)
            {
                configurator.Subscribe(subscriptionSource);
            }

            return(configurator);
        }
 /// <summary>
 /// Specify the endpoint from which messages should be read
 /// </summary>
 /// <param name="configurator"></param>
 /// <param name="uriString">The uri of the endpoint</param>
 public static IServiceBusConfigurator ReceiveFrom(this IServiceBusConfigurator configurator, string uriString)
 {
     configurator.ReceiveFrom(uriString.ToUri("The receive endpoint URI is invalid"));
     return(configurator);
 }