Ejemplo n.º 1
0
 protected ThrottlingMessageReceiver(ConcurrentHandlerLimitSetting concurrentHandlerLimit, IGlobalHandlerThrottle globalHandlerThrottle, ILogger logger)
 {
     ConcurrentHandlerLimit = concurrentHandlerLimit;
     _logger = logger;
     _globalHandlerThrottle = globalHandlerThrottle;
     _localHandlerThrottle = new SemaphoreSlim(concurrentHandlerLimit, concurrentHandlerLimit);
 }
Ejemplo n.º 2
0
 protected ThrottlingMessageReceiver(ConcurrentHandlerLimitSetting concurrentHandlerLimit, IGlobalHandlerThrottle globalHandlerThrottle, ILogger logger)
 {
     ConcurrentHandlerLimit = concurrentHandlerLimit;
     _logger = logger;
     _globalHandlerThrottle = globalHandlerThrottle;
     _localHandlerThrottle  = new SemaphoreSlim(concurrentHandlerLimit, concurrentHandlerLimit);
 }
Ejemplo n.º 3
0
        public InProcessQueueReceiver(string queuePath,
                                      ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                      InProcessMessageStore messageStore,
                                      IGlobalHandlerThrottle globalHandlerThrottle,
                                      ILogger logger) : base(concurrentHandlerLimit, globalHandlerThrottle, logger)
        {
            _queuePath    = queuePath;
            _messageStore = messageStore;

            _messageQueue = new ThreadSafeLazy <AsyncBlockingCollection <NimbusMessage> >(() => _messageStore.GetOrCreateMessageQueue(_queuePath));
        }
Ejemplo n.º 4
0
        public InProcessQueueReceiver(string queuePath,
                                      ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                      InProcessMessageStore messageStore,
                                      IGlobalHandlerThrottle globalHandlerThrottle,
                                      ILogger logger) : base(concurrentHandlerLimit, globalHandlerThrottle, logger)
        {
            _queuePath = queuePath;
            _messageStore = messageStore;

            _messageQueue = new ThreadSafeLazy<AsyncBlockingCollection<NimbusMessage>>(() => _messageStore.GetOrCreateMessageQueue(_queuePath));
        }
 public AzureServiceBusQueueMessageReceiver(IBrokeredMessageFactory brokeredMessageFactory,
                                            IQueueManager queueManager,
                                            string queuePath,
                                            ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                            IGlobalHandlerThrottle globalHandlerThrottle,
                                            ILogger logger)
     : base(concurrentHandlerLimit, globalHandlerThrottle, logger)
 {
     _queueManager           = queueManager;
     _queuePath              = queuePath;
     _logger                 = logger;
     _brokeredMessageFactory = brokeredMessageFactory;
 }
 public AzureServiceBusQueueMessageReceiver(IBrokeredMessageFactory brokeredMessageFactory,
                                              IQueueManager queueManager,
                                              string queuePath,
                                              ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                              IGlobalHandlerThrottle globalHandlerThrottle,
                                              ILogger logger)
     : base(concurrentHandlerLimit, globalHandlerThrottle, logger)
 {
     _queueManager = queueManager;
     _queuePath = queuePath;
     _logger = logger;
     _brokeredMessageFactory = brokeredMessageFactory;
 }
Ejemplo n.º 7
0
 public RedisMessageReceiver(string redisKey,
                             Func <ConnectionMultiplexer> connectionMultiplexerFunc,
                             Func <IDatabase> databaseFunc,
                             ISerializer serializer,
                             ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                             IGlobalHandlerThrottle globalHandlerThrottle,
                             ILogger logger) : base(concurrentHandlerLimit, globalHandlerThrottle, logger)
 {
     _redisKey = redisKey;
     _connectionMultiplexerFunc = connectionMultiplexerFunc;
     _databaseFunc = databaseFunc;
     _serializer   = serializer;
     _logger       = logger;
 }
Ejemplo n.º 8
0
 public RedisMessageReceiver(string redisKey,
                             Func<ConnectionMultiplexer> connectionMultiplexerFunc,
                             Func<IDatabase> databaseFunc,
                             ISerializer serializer,
                             ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                             IGlobalHandlerThrottle globalHandlerThrottle,
                             ILogger logger) : base(concurrentHandlerLimit, globalHandlerThrottle, logger)
 {
     _redisKey = redisKey;
     _connectionMultiplexerFunc = connectionMultiplexerFunc;
     _databaseFunc = databaseFunc;
     _serializer = serializer;
     _logger = logger;
 }
 public WindowsServiceBusSubscriptionMessageReceiver(IQueueManager queueManager,
                                                     string topicPath,
                                                     string subscriptionName,
                                                     ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                                     IBrokeredMessageFactory brokeredMessageFactory,
                                                     IGlobalHandlerThrottle globalHandlerThrottle,
                                                     ILogger logger)
     : base(concurrentHandlerLimit, globalHandlerThrottle, logger)
 {
     _queueManager           = queueManager;
     _topicPath              = topicPath;
     _subscriptionName       = subscriptionName;
     _brokeredMessageFactory = brokeredMessageFactory;
     _logger = logger;
 }
 public InProcessSubscriptionReceiver(Subscription subscription,
                                      ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                      InProcessMessageStore messageStore,
                                      IGlobalHandlerThrottle globalHandlerThrottle,
                                      ILogger logger)
     : base(
         InProcessTransport.FullyQualifiedSubscriptionPath(subscription.TopicPath, subscription.SubscriptionName),
         concurrentHandlerLimit,
         messageStore,
         globalHandlerThrottle,
         logger)
 {
     _subscription = subscription;
     _messageStore = messageStore;
 }
 public WindowsServiceBusSubscriptionMessageReceiver(IQueueManager queueManager,
                                                     string topicPath,
                                                     string subscriptionName,
                                                     ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                                     IBrokeredMessageFactory brokeredMessageFactory,
                                                     IGlobalHandlerThrottle globalHandlerThrottle,
                                                     ILogger logger)
     : base(concurrentHandlerLimit, globalHandlerThrottle, logger)
 {
     _queueManager = queueManager;
     _topicPath = topicPath;
     _subscriptionName = subscriptionName;
     _brokeredMessageFactory = brokeredMessageFactory;
     _logger = logger;
 }
Ejemplo n.º 12
0
 public InProcessSubscriptionReceiver(Subscription subscription,
                                      ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                      InProcessMessageStore messageStore,
                                      IGlobalHandlerThrottle globalHandlerThrottle,
                                      ILogger logger)
     : base(
         InProcessTransport.FullyQualifiedSubscriptionPath(subscription.TopicPath, subscription.SubscriptionName),
         concurrentHandlerLimit,
         messageStore,
         globalHandlerThrottle,
         logger)
 {
     _subscription = subscription;
     _messageStore = messageStore;
 }
Ejemplo n.º 13
0
 public WindowsServiceBusTransport(ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                   IBrokeredMessageFactory brokeredMessageFactory,
                                   IGlobalHandlerThrottle globalHandlerThrottle,
                                   ILogger logger,
                                   IQueueManager queueManager,
                                   Func <NamespaceManager> namespaceManager,
                                   IRetry retry)
 {
     _queueManager           = queueManager;
     _namespaceManager       = namespaceManager;
     _retry                  = retry;
     _brokeredMessageFactory = brokeredMessageFactory;
     _globalHandlerThrottle  = globalHandlerThrottle;
     _concurrentHandlerLimit = concurrentHandlerLimit;
     _logger                 = logger;
 }
Ejemplo n.º 14
0
 public WindowsServiceBusTransport(ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                   IBrokeredMessageFactory brokeredMessageFactory,
                                   IGlobalHandlerThrottle globalHandlerThrottle,
                                   ILogger logger,
                                   IQueueManager queueManager,
                                   Func<NamespaceManager> namespaceManager,
                                   IRetry retry)
 {
     _queueManager = queueManager;
     _namespaceManager = namespaceManager;
     _retry = retry;
     _brokeredMessageFactory = brokeredMessageFactory;
     _globalHandlerThrottle = globalHandlerThrottle;
     _concurrentHandlerLimit = concurrentHandlerLimit;
     _logger = logger;
 }
Ejemplo n.º 15
0
 public AzureServiceBusTransport(ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                 IBrokeredMessageFactory brokeredMessageFactory,
                                 IGlobalHandlerThrottle globalHandlerThrottle,
                                 ILogger logger,
                                 IQueueManager queueManager,
                                 IRetry retry,
                                 IDependencyResolver dependencyResolver,
                                 ISqlFilterExpressionGenerator sqlFilterExpressionGenerator)
 {
     _queueManager                 = queueManager;
     _retry                        = retry;
     _dependencyResolver           = dependencyResolver;
     _sqlFilterExpressionGenerator = sqlFilterExpressionGenerator;
     _brokeredMessageFactory       = brokeredMessageFactory;
     _globalHandlerThrottle        = globalHandlerThrottle;
     _concurrentHandlerLimit       = concurrentHandlerLimit;
     _logger                       = logger;
 }
Ejemplo n.º 16
0
 public AzureServiceBusTransport(ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                 IBrokeredMessageFactory brokeredMessageFactory,
                                 IGlobalHandlerThrottle globalHandlerThrottle,
                                 ILogger logger,
                                 IQueueManager queueManager,
                                 Func<NamespaceManager> namespaceManager,
                                 IRetry retry,
                                 IDependencyResolver dependencyResolver,
                                 ISqlFilterExpressionGenerator sqlFilterExpressionGenerator)
 {
     _queueManager = queueManager;
     _namespaceManager = namespaceManager;
     _retry = retry;
     _dependencyResolver = dependencyResolver;
     _sqlFilterExpressionGenerator = sqlFilterExpressionGenerator;
     _brokeredMessageFactory = brokeredMessageFactory;
     _globalHandlerThrottle = globalHandlerThrottle;
     _concurrentHandlerLimit = concurrentHandlerLimit;
     _logger = logger;
 }
Ejemplo n.º 17
0
 public RedisSubscriptionReceiver(Subscription subscription,
                                  Func <ConnectionMultiplexer> connectionMultiplexerFunc,
                                  Func <IDatabase> databaseFunc,
                                  ISerializer serializer,
                                  ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                  IGlobalHandlerThrottle globalHandlerThrottle,
                                  ILogger logger,
                                  IRetry retry)
     : base(
         subscription.SubscriptionMessagesRedisKey,
         connectionMultiplexerFunc,
         databaseFunc,
         serializer,
         concurrentHandlerLimit,
         globalHandlerThrottle,
         logger)
 {
     _subscription = subscription;
     _databaseFunc = databaseFunc;
     _retry        = retry;
 }
Ejemplo n.º 18
0
 public RedisSubscriptionReceiver(Subscription subscription,
                                  Func<ConnectionMultiplexer> connectionMultiplexerFunc,
                                  Func<IDatabase> databaseFunc,
                                  ISerializer serializer,
                                  ConcurrentHandlerLimitSetting concurrentHandlerLimit,
                                  IGlobalHandlerThrottle globalHandlerThrottle,
                                  ILogger logger,
                                  IRetry retry)
     : base(
         subscription.SubscriptionMessagesRedisKey,
         connectionMultiplexerFunc,
         databaseFunc,
         serializer,
         concurrentHandlerLimit,
         globalHandlerThrottle,
         logger)
 {
     _subscription = subscription;
     _databaseFunc = databaseFunc;
     _retry = retry;
 }