public ServiceBusHost(ServiceBusHostSettings settings, IServiceBusHostTopology hostTopology, IServiceBusBusConfiguration busConfiguration) { Settings = settings; Topology = hostTopology; var busConfiguration1 = busConfiguration; _receiveEndpoints = new ReceiveEndpointCollection(); RetryPolicy = Retry.CreatePolicy(x => { x.Ignore <MessagingEntityNotFoundException>(); x.Ignore <MessagingEntityAlreadyExistsException>(); x.Ignore <MessageNotFoundException>(); x.Ignore <MessageSizeExceededException>(); x.Handle <ServerBusyException>(exception => exception.IsTransient); x.Handle <TimeoutException>(); x.Interval(5, TimeSpan.FromSeconds(10)); }); BasePath = settings.ServiceUri.AbsolutePath.Trim('/'); var serviceBusRetryPolicy = CreateRetryPolicy(settings); MessagingFactoryCache = new MessagingFactoryCache(settings.ServiceUri, CreateMessagingFactorySettings(settings), serviceBusRetryPolicy); NamespaceCache = new NamespaceCache(settings.ServiceUri, CreateNamespaceManagerSettings(settings, serviceBusRetryPolicy)); _receiveEndpointFactory = new ServiceBusReceiveEndpointFactory(busConfiguration1, this); _subscriptionEndpointFactory = new ServiceBusSubscriptionEndpointFactory(busConfiguration1, this); }
public ServiceBusHost(ServiceBusHostSettings settings) { Settings = settings; _messagingFactory = new Lazy <Task <MessagingFactory> >(CreateMessagingFactory); _sessionMessagingFactory = new Lazy <Task <MessagingFactory> >(CreateNetMessagingFactory); _namespaceManager = new Lazy <NamespaceManager>(CreateNamespaceManager); _rootNamespaceManager = new Lazy <NamespaceManager>(CreateRootNamespaceManager); MessageNameFormatter = new ServiceBusMessageNameFormatter(); _receiveEndpoints = new ReceiveEndpointCollection(); _supervisor = new TaskSupervisor($"{TypeMetadataCache<ServiceBusHost>.ShortName} - {Settings.ServiceUri}"); RetryPolicy = Retry.CreatePolicy(x => { x.Ignore <MessagingEntityNotFoundException>(); x.Ignore <MessagingEntityAlreadyExistsException>(); x.Ignore <MessageNotFoundException>(); x.Ignore <MessageSizeExceededException>(); x.Ignore <NoMatchingSubscriptionException>(); x.Ignore <TransactionSizeExceededException>(); x.Handle <ServerBusyException>(exception => exception.IsTransient || exception.IsWrappedExceptionTransient()); x.Handle <MessagingException>(exception => exception.IsTransient || exception.IsWrappedExceptionTransient()); x.Handle <TimeoutException>(); x.Intervals(100, 500, 1000, 5000, 10000); }); }
public ServiceBusHost(IServiceBusHostConfiguration hostConfiguration) { _hostConfiguration = hostConfiguration; _receiveEndpoints = new ReceiveEndpointCollection(); Add(_receiveEndpoints); RetryPolicy = Retry.CreatePolicy(x => { x.Ignore <MessagingEntityNotFoundException>(); x.Ignore <MessagingEntityAlreadyExistsException>(); x.Ignore <MessageNotFoundException>(); x.Ignore <MessageSizeExceededException>(); x.Handle <ServerBusyException>(exception => exception.IsTransient); x.Handle <TimeoutException>(); x.Interval(5, TimeSpan.FromSeconds(10)); }); BasePath = _hostConfiguration.HostAddress.AbsolutePath.Trim('/'); MessagingFactoryContextSupervisor = new MessagingFactoryContextSupervisor(hostConfiguration); NamespaceContextSupervisor = new NamespaceContextSupervisor(hostConfiguration); }
protected BaseHost(IHostConfiguration hostConfiguration, IHostTopology hostTopology) { _hostConfiguration = hostConfiguration; _hostTopology = hostTopology; _receiveEndpoints = new ReceiveEndpointCollection(); }
protected BaseHost(IHostConfiguration hostConfiguration) { _hostConfiguration = hostConfiguration; _receiveEndpoints = new ReceiveEndpointCollection(); Add(_receiveEndpoints); }
public InMemoryHost(int concurrencyLimit) { _concurrencyLimit = concurrencyLimit; _transports = new ConcurrentDictionary <string, InMemoryTransport>(StringComparer.OrdinalIgnoreCase); _receiveEndpoints = new ReceiveEndpointCollection(); }
public RiderAgent(IClientContextSupervisor supervisor, IReceiveEndpointCollection endpoints, Task ready) { _supervisor = supervisor; _endpoints = endpoints; SetReady(ready); SetCompleted(_supervisor.Completed); }
public InMemoryHost(int concurrencyLimit, Uri baseAddress = null) { _concurrencyLimit = concurrencyLimit; _baseUri = baseAddress ?? new Uri("loopback://localhost/"); _transports = new ConcurrentDictionary <string, InMemoryTransport>(StringComparer.OrdinalIgnoreCase); _receiveEndpoints = new ReceiveEndpointCollection(); }
public KafkaRider(IKafkaHostConfiguration hostConfiguration, IBusInstance busInstance, IReceiveEndpointCollection endpoints, ITopicProducerProvider producerProvider, IRiderRegistrationContext registrationContext) { _hostConfiguration = hostConfiguration; _busInstance = busInstance; _endpoints = endpoints; _producerProvider = producerProvider; _registrationContext = registrationContext; }
public HttpHost(IHttpHostConfiguration configuration) { _configuration = configuration; _receiveEndpoints = new ReceiveEndpointCollection(); Add(_receiveEndpoints); _httpHostContextSupervisor = new HttpHostContextSupervisor(configuration); }
public InMemoryHost(int concurrencyLimit, IHostTopology topology, Uri baseAddress = null) { Topology = topology; _baseUri = baseAddress ?? new Uri("loopback://localhost/"); _messageFabric = new MessageFabric(concurrencyLimit); _receiveEndpoints = new ReceiveEndpointCollection(); var cache = new GreenCache <InMemorySendTransport>(10000, TimeSpan.FromMinutes(1), TimeSpan.FromHours(24), () => DateTime.UtcNow); _index = cache.AddIndex("exchangeName", x => x.ExchangeName); }
public ServiceBusHost(ServiceBusHostSettings settings) { Settings = settings; _messagingFactory = new Lazy <Task <MessagingFactory> >(CreateMessagingFactory); _sessionMessagingFactory = new Lazy <Task <MessagingFactory> >(CreateNetMessagingFactory); _namespaceManager = new Lazy <NamespaceManager>(CreateNamespaceManager); _rootNamespaceManager = new Lazy <NamespaceManager>(CreateRootNamespaceManager); MessageNameFormatter = new ServiceBusMessageNameFormatter(); _receiveEndpoints = new ReceiveEndpointCollection(); _supervisor = new TaskSupervisor($"{TypeMetadataCache<ServiceBusHost>.ShortName} - {Settings.ServiceUri}"); RetryPolicy = Retry.Selected <ServerBusyException, TimeoutException>().Intervals(100, 500, 1000, 5000, 10000); }
public ActiveMqHost(IActiveMqHostConfiguration hostConfiguration) { _hostConfiguration = hostConfiguration; _receiveEndpoints = new ReceiveEndpointCollection(); Add(_receiveEndpoints); ConnectionRetryPolicy = Retry.CreatePolicy(x => { x.Handle <ActiveMqTransportException>(); x.Exponential(1000, TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(3)); }); ConnectionContextSupervisor = new ActiveMqConnectionContextSupervisor(hostConfiguration); }
public InMemoryHost(IInMemoryHostConfiguration hostConfiguration, int concurrencyLimit, IHostTopology topology, Uri baseAddress = null) { _hostConfiguration = hostConfiguration; Topology = topology; Address = baseAddress ?? new Uri("loopback://localhost/"); _messageFabric = new MessageFabric(concurrencyLimit); _receiveEndpoints = new ReceiveEndpointCollection(); Add(_receiveEndpoints); var cacheSettings = new CacheSettings(10000, TimeSpan.FromMinutes(1), TimeSpan.FromHours(24)); var cache = new GreenCache <InMemorySendTransport>(cacheSettings); _index = cache.AddIndex("exchangeName", x => x.ExchangeName); }