Beispiel #1
0
        public HttpHost(HttpHostSettings hostSettings, IHostTopology topology)
        {
            _settings = hostSettings;
            Topology  = topology;

            ReceiveEndpoints = new ReceiveEndpointCollection();

            _httpHostCache = new HttpHostCache(Settings);
        }
Beispiel #2
0
        public HttpHost(HttpHostSettings hostSettings)
        {
            _settings = hostSettings;

            //exception Filter
            ReceiveEndpoints = new ReceiveEndpointCollection();

            //connection retry policy

            _supervisor = new TaskSupervisor($"{TypeMetadataCache<HttpHost>.ShortName} - {Settings.Host}");

            _owinHostCache = new OwinHostCache(Settings, _supervisor);
        }
        public IEventHubRider Build(IRiderRegistrationContext context, IBusInstance busInstance)
        {
            var endpoints = new ReceiveEndpointCollection();

            foreach (var endpoint in _endpoints)
            {
                endpoints.Add(endpoint.EndpointName, endpoint.CreateReceiveEndpoint(busInstance));
            }

            var producerProvider = _producerSpecification.CreateProducerProvider(busInstance);

            return(new EventHubRider(this, busInstance, endpoints, new CachedEventHubProducerProvider(producerProvider), context));
        }
Beispiel #4
0
        public RabbitMqHost(RabbitMqHostSettings settings)
        {
            _settings = settings;

            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, _supervisor);
        }
Beispiel #5
0
        public ActiveMqHost(IActiveMqBusConfiguration busConfiguration, ActiveMqHostSettings settings, IActiveMqHostTopology topology)
        {
            _settings = settings;
            _topology = topology;

            ReceiveEndpoints = new ReceiveEndpointCollection();

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

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

            ConnectionCache = new ActiveMqConnectionCache(settings, _topology);

            ReceiveEndpointFactory = new ActiveMqReceiveEndpointFactory(busConfiguration, this);
        }