示例#1
0
        public RabbitMqHost(RabbitMqHostSettings hostSettings)
        {
            _hostSettings = hostSettings;

            _connectionCache = new RabbitMqConnectionCache(hostSettings);
            MessageNameFormatter = new RabbitMqMessageNameFormatter();
        }
示例#2
0
        public RabbitMqHost(RabbitMqHostSettings hostSettings)
        {
            _hostSettings = hostSettings;

            _connectionCache     = new RabbitMqConnectionCache(hostSettings);
            MessageNameFormatter = new RabbitMqMessageNameFormatter();
        }
示例#3
0
        public RabbitMqHost(RabbitMqHostSettings hostSettings)
        {
            _hostSettings = hostSettings;

            var exceptionFilter = Retry.Selected<RabbitMqConnectionException>();

            _connectionRetryPolicy = exceptionFilter.Exponential(1000, TimeSpan.FromMilliseconds(100), TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(1));

            _supervisor = new TaskSupervisor($"{TypeMetadataCache<RabbitMqHost>.ShortName} - {_hostSettings.ToDebugString()}");

            _connectionCache = new RabbitMqConnectionCache(hostSettings, _supervisor);
        }
示例#4
0
        public RabbitMqHost(RabbitMqHostSettings hostSettings)
        {
            _hostSettings = hostSettings;

            var exceptionFilter = Retry.Selected <RabbitMqConnectionException>();

            _connectionRetryPolicy = exceptionFilter.Exponential(1000, TimeSpan.FromMilliseconds(100), TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(1));

            _supervisor = new TaskSupervisor($"{TypeMetadataCache<RabbitMqHost>.ShortName} - {_hostSettings.ToDebugString()}");

            _connectionCache = new RabbitMqConnectionCache(hostSettings, _supervisor);
        }
示例#5
0
        public RabbitMqHost(RabbitMqHostSettings settings, IRabbitMqHostTopology topology)
        {
            _settings = settings;
            _topology = topology;

            var exceptionFilter = Retry.Selected <RabbitMqConnectionException>();

            ReceiveEndpoints = new ReceiveEndpointCollection();

            _connectionRetryPolicy = exceptionFilter.Exponential(1000, TimeSpan.FromMilliseconds(100), TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(1));

            _supervisor = new TaskSupervisor($"{TypeMetadataCache<RabbitMqHost>.ShortName} - {_settings.ToDebugString()}");

            _connectionCache = new RabbitMqConnectionCache(settings, _topology, _supervisor);
        }
示例#6
0
        public RabbitMqHost(IRabbitMqBusConfiguration busConfiguration, RabbitMqHostSettings settings, IRabbitMqHostTopology topology)
        {
            _settings = settings;
            _topology = topology;

            ReceiveEndpoints = new ReceiveEndpointCollection();

            ConnectionRetryPolicy = Retry.CreatePolicy(x =>
            {
                x.Handle <RabbitMqConnectionException>();

                x.Exponential(1000, TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(3));
            });

            ConnectionCache = new RabbitMqConnectionCache(settings, _topology);

            ReceiveEndpointFactory = new RabbitMqReceiveEndpointFactory(busConfiguration, this);
        }
示例#7
0
 public Handle(RabbitMqConnectionCache cache, Task connectionTask)
 {
     _cache          = cache;
     _connectionTask = connectionTask;
 }
示例#8
0
 public Handle(RabbitMqConnectionCache cache, Task connectionTask)
 {
     _cache = cache;
     _connectionTask = connectionTask;
 }