Пример #1
0
		protected BusScenarioBuilderImpl(Uri uri)
		{
			_settings = new ServiceBusDefaultSettings();
			_settings.ConcurrentConsumerLimit = 4;
			_settings.ReceiveTimeout = 50.Milliseconds();

			_configurator = new ServiceBusConfiguratorImpl(_settings);
			_configurator.ReceiveFrom(uri);
		}
        protected BusScenarioBuilderImpl(Uri uri)
        {
            _settings = new ServiceBusDefaultSettings();
            _settings.ConcurrentConsumerLimit = 4;
            _settings.ReceiveTimeout          = 50.Milliseconds();

            _configurator = new ServiceBusConfiguratorImpl(_settings);
            _configurator.ReceiveFrom(uri);
        }
Пример #3
0
        public LoopbackLocalRemoteBusScenarioBuilder()
        {
            _settings = new ServiceBusDefaultSettings();
            _settings.ConcurrentConsumerLimit = 4;
            _settings.ReceiveTimeout          = 50.Milliseconds();

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

            _remoteConfigurator = new ServiceBusConfiguratorImpl(_settings);
            _remoteConfigurator.ReceiveFrom(DefaultRemoteUri);
        }
Пример #4
0
		public static IServiceBus New([NotNull] Action<ServiceBusConfigurator> configure)
		{
			Guard.AgainstNull(configure, "configure");

			var configurator = new ServiceBusConfiguratorImpl(_defaultSettings);

			configure(configurator);

			var result = ConfigurationResultImpl.CompileResults(configurator.Validate());

			try
			{
				return configurator.CreateServiceBus();
			}
			catch (Exception ex)
			{
				throw new ConfigurationException(result, "An exception was thrown during service bus creation", ex);
			}
		}
Пример #5
0
        public static IServiceBus New([NotNull] Action <ServiceBusConfigurator> configure)
        {
            Guard.AgainstNull(configure, "configure");

            var configurator = new ServiceBusConfiguratorImpl(_defaultSettings);

            configure(configurator);

            var result = ConfigurationResultImpl.CompileResults(configurator.Validate());

            try
            {
                return(configurator.CreateServiceBus());
            }
            catch (Exception ex)
            {
                throw new ConfigurationException(result, "An exception was thrown during service bus creation", ex);
            }
        }