private void CreateBus(string azureNamespace, string queueName, string azureServiceBusKey)
        {
            var queueUri = "azure-sb://" + azureNamespace + "/" + queueName;

            _busConfigurator.ReceiveFrom(queueUri);
            SetupAzureServiceBus(azureNamespace, azureServiceBusKey);
        }
コード例 #2
0
 public void Config(IComponentContext container, ServiceBusConfigurator busConfig)
 {
     busConfig.UseMsmq();
     busConfig.UseMulticastSubscriptionClient();
     busConfig.VerifyMsmqConfiguration();
     busConfig.VerifyMsDtcConfiguration();
     busConfig.ReceiveFrom(receiveFromEndPoint);
 }
コード例 #3
0
 public void Config(IComponentContext container, ServiceBusConfigurator busConfig)
 {
     busConfig.UseMsmq();
     busConfig.UseMulticastSubscriptionClient();
     busConfig.VerifyMsmqConfiguration();
     busConfig.VerifyMsDtcConfiguration();
     busConfig.ReceiveFrom(receiveFromEndPoint);
 }
コード例 #4
0
        /// <summary>
        /// c'tor
        /// </summary>
        /// <param name="uri">The uri to receive from during the scenario.</param>
        protected BusScenarioBuilder(Uri uri)
        {
            _settings = new ServiceBusDefaultSettings();
            _settings.ConcurrentConsumerLimit = 1;
            _settings.ReceiveTimeout          = 50.Milliseconds();

            _configurator = new ServiceBusConfigurator(_settings);
            _configurator.ReceiveFrom(uri);
        }
コード例 #5
0
 protected virtual void ConfigureRemoteBus(ServiceBusConfigurator configurator)
 {
     configurator.ReceiveFrom("loopback://localhost/mt_server");
     configurator.AddSubscriptionObserver((bus, coordinator) =>
     {
         _remoteLoopback = new SubscriptionLoopback(bus, coordinator);
         return(_remoteLoopback);
     });
 }
コード例 #6
0
 protected virtual void ConfigureRemoteBus(ServiceBusConfigurator configurator)
 {
     configurator.ReceiveFrom(RemoteEndpointUri);
     configurator.AddSubscriptionObserver((bus, coordinator) =>
     {
         _remoteLoopback = new SubscriptionLoopback(bus, coordinator);
         return(_remoteLoopback);
     });
 }
コード例 #7
0
 protected virtual void ConfigureLocalBus(ServiceBusConfigurator configurator)
 {
     LocalUri = new Uri("loopback://localhost/mt_client");
     configurator.ReceiveFrom(LocalUri);
     configurator.AddSubscriptionObserver((bus, coordinator) =>
     {
         _localLoopback = new SubscriptionLoopback(bus, coordinator);
         return(_localLoopback);
     });
 }
コード例 #8
0
        public LoopbackLocalRemoteBusScenarioBuilder()
        {
            _settings = new ServiceBusDefaultSettings();
            _settings.ConcurrentConsumerLimit = 4;
            _settings.ReceiveTimeout          = 50.Milliseconds();

            _localConfigurator = new ServiceBusConfigurator(_settings);
            _localConfigurator.ReceiveFrom(DefaultLocalUri);

            _remoteConfigurator = new ServiceBusConfigurator(_settings);
            _remoteConfigurator.ReceiveFrom(DefaultRemoteUri);
        }
コード例 #9
0
 protected virtual void ConfigureFaultBus(ServiceBusConfigurator configurator)
 {
     configurator.SetConcurrentConsumerLimit(1);
     configurator.ReceiveFrom(FaultEndpointUri);
     configurator.AddSubscriptionObserver((bus, coordinator) =>
     {
         _localFaultLoopback = new SubscriptionLoopback(bus, coordinator);
         return(_localFaultLoopback);
     });
     configurator.AddSubscriptionObserver((bus, coordinator) =>
     {
         _remoteFaultLoopback = new SubscriptionLoopback(bus, coordinator);
         return(_remoteFaultLoopback);
     });
 }
コード例 #10
0
    private void ConfigureMassTransit(ServiceBusConfigurator config)
    {
        config.UseRabbitMq();
        var queueConnection = _rabbitMqConnection + "/" + _queue;

        config.ReceiveFrom(queueConnection);

        if (_queue == Queue.Worker)
        {
            foreach (var massTransitConsumer in _massTransitConsumers)
            {
                var consumerType = massTransitConsumer;
                config.Subscribe(s => s.Consumer(consumerType, t => _kernel.Get(t)));
            }
        }
    }
コード例 #11
0
        void ITransportConfigurator.Configure(ServiceBusConfigurator configurator, string queueName, int? consumerLimit)
        {
            Uri receiveFrom = _settings.GetQueueAddress(queueName, consumerLimit);

            configurator.UseRabbitMq(x =>
                {
                    x.ConfigureHost(receiveFrom, h =>
                        {
                            h.SetUsername(_settings.Username);
                            h.SetPassword(_settings.Password);
                            h.SetRequestedHeartbeat(_settings.Heartbeat);
                        });
                });

            configurator.ReceiveFrom(receiveFrom);
            if (consumerLimit.HasValue)
                configurator.SetConcurrentConsumerLimit(consumerLimit.Value);
        }
コード例 #12
0
        void ITransportConfigurator.Configure(ServiceBusConfigurator configurator, string queueName, int?consumerLimit)
        {
            Uri receiveFrom = _settings.GetQueueAddress(queueName, consumerLimit);

            configurator.UseRabbitMq(x =>
            {
                x.ConfigureHost(receiveFrom, h =>
                {
                    h.SetUsername(_settings.Username);
                    h.SetPassword(_settings.Password);
                    h.SetRequestedHeartbeat(_settings.Heartbeat);
                });
            });

            configurator.ReceiveFrom(receiveFrom);
            if (consumerLimit.HasValue)
            {
                configurator.SetConcurrentConsumerLimit(consumerLimit.Value);
            }
        }
コード例 #13
0
 protected virtual void ConfigureLocalBus(ServiceBusConfigurator configurator)
 {
     configurator.ReceiveFrom(LocalUri);
 }
コード例 #14
0
 /// <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 void ReceiveFrom(this ServiceBusConfigurator configurator, string uriString)
 {
     configurator.ReceiveFrom(uriString.ToUri("The receive endpoint URI is invalid"));
 }
コード例 #15
0
 protected virtual void ConfigureRemoteBus(ServiceBusConfigurator configurator)
 {
     configurator.ReceiveFrom(RemoteEndpointUri);
     configurator.UseMsmq(x => x.UseMulticastSubscriptionClient());
 }
コード例 #16
0
 protected virtual void ConfigureLocalBus(ServiceBusConfigurator configurator)
 {
     configurator.ReceiveFrom(_localUri);
 }
コード例 #17
0
 protected virtual void ConfigureLocalBus(ServiceBusConfigurator configurator)
 {
     configurator.ReceiveFrom(LocalEndpointUri);
     configurator.UseMulticastSubscriptionClient();
 }
コード例 #18
0
 public void Config(IComponentContext container, ServiceBusConfigurator busConfig)
 {
     busConfig.UseRabbitMq();
     busConfig.ReceiveFrom(receiveFromEndPoint);
 }
コード例 #19
0
 public void Config(IComponentContext container, ServiceBusConfigurator busConfig)
 {
     busConfig.UseRabbitMq();
     busConfig.ReceiveFrom(receiveFromEndPoint);
 }