public PersistentSubscriptionParams(bool resolveLinkTos, string subscriptionId, string eventStreamId, string groupName, 
                                    int startFrom, bool extraStatistics, TimeSpan messageTimeout, 
                                    int maxRetryCount, int liveBufferSize, int bufferSize, int readBatchSize,
                                    TimeSpan checkPointAfter, int minCheckPointCount,
                                    int maxCheckPointCount, int maxSubscriberCount, 
                                    IPersistentSubscriptionConsumerStrategy consumerStrategy,
                                    IPersistentSubscriptionStreamReader streamReader, 
                                    IPersistentSubscriptionCheckpointReader checkpointReader, 
                                    IPersistentSubscriptionCheckpointWriter checkpointWriter,
                                    IPersistentSubscriptionMessageParker messageParker)
 {
     _resolveLinkTos = resolveLinkTos;
     _subscriptionId = subscriptionId;
     _eventStreamId = eventStreamId;
     _groupName = groupName;
     _startFrom = startFrom;
     _extraStatistics = extraStatistics;
     _messageTimeout = messageTimeout;
     _maxRetryCount = maxRetryCount;
     _liveBufferSize = liveBufferSize;
     _bufferSize = bufferSize;
     _checkPointAfter = checkPointAfter;
     _minCheckPointCount = minCheckPointCount;
     _maxCheckPointCount = maxCheckPointCount;
     _maxSubscriberCount = maxSubscriberCount;
     _consumerStrategy = consumerStrategy;
     _readBatchSize = readBatchSize;
     _streamReader = streamReader;
     _checkpointReader = checkpointReader;
     _checkpointWriter = checkpointWriter;
     _messageParker = messageParker;
 }
Beispiel #2
0
 public PersistentSubscriptionParams(bool resolveLinkTos, string subscriptionId, string eventStreamId, string groupName,
                                     int startFrom, bool extraStatistics, TimeSpan messageTimeout,
                                     int maxRetryCount, int liveBufferSize, int bufferSize, int readBatchSize,
                                     TimeSpan checkPointAfter, int minCheckPointCount,
                                     int maxCheckPointCount, int maxSubscriberCount,
                                     IPersistentSubscriptionConsumerStrategy consumerStrategy,
                                     IPersistentSubscriptionStreamReader streamReader,
                                     IPersistentSubscriptionCheckpointReader checkpointReader,
                                     IPersistentSubscriptionCheckpointWriter checkpointWriter,
                                     IPersistentSubscriptionMessageParker messageParker)
 {
     _resolveLinkTos     = resolveLinkTos;
     _subscriptionId     = subscriptionId;
     _eventStreamId      = eventStreamId;
     _groupName          = groupName;
     _startFrom          = startFrom;
     _extraStatistics    = extraStatistics;
     _messageTimeout     = messageTimeout;
     _maxRetryCount      = maxRetryCount;
     _liveBufferSize     = liveBufferSize;
     _bufferSize         = bufferSize;
     _checkPointAfter    = checkPointAfter;
     _minCheckPointCount = minCheckPointCount;
     _maxCheckPointCount = maxCheckPointCount;
     _maxSubscriberCount = maxSubscriberCount;
     _consumerStrategy   = consumerStrategy;
     _readBatchSize      = readBatchSize;
     _streamReader       = streamReader;
     _checkpointReader   = checkpointReader;
     _checkpointWriter   = checkpointWriter;
     _messageParker      = messageParker;
 }
        internal PersistentSubscriptionService(IQueuedHandler queuedHandler, IReadIndex readIndex,
                                               IODispatcher ioDispatcher, IPublisher bus,
                                               PersistentSubscriptionConsumerStrategyRegistry consumerStrategyRegistry)
        {
            Ensure.NotNull(queuedHandler, "queuedHandler");
            Ensure.NotNull(readIndex, "readIndex");
            Ensure.NotNull(ioDispatcher, "ioDispatcher");

            _queuedHandler            = queuedHandler;
            _readIndex                = readIndex;
            _ioDispatcher             = ioDispatcher;
            _bus                      = bus;
            _consumerStrategyRegistry = consumerStrategyRegistry;
            _checkpointReader         = new PersistentSubscriptionCheckpointReader(_ioDispatcher);
            _streamReader             = new PersistentSubscriptionStreamReader(_ioDispatcher, 100);
            _timerTickCorrelationId   = Guid.NewGuid();
        }
        internal PersistentSubscriptionService(IQueuedHandler queuedHandler, IReadIndex readIndex, IODispatcher ioDispatcher, IPublisher bus, PersistentSubscriptionConsumerStrategyRegistry consumerStrategyRegistry)
        {
            Ensure.NotNull(queuedHandler, "queuedHandler");
            Ensure.NotNull(readIndex, "readIndex");
            Ensure.NotNull(ioDispatcher, "ioDispatcher");

            _queuedHandler            = queuedHandler;
            _readIndex                = readIndex;
            _ioDispatcher             = ioDispatcher;
            _bus                      = bus;
            _consumerStrategyRegistry = consumerStrategyRegistry;
            _checkpointReader         = new PersistentSubscriptionCheckpointReader(_ioDispatcher);
            _streamReader             = new PersistentSubscriptionStreamReader(_ioDispatcher, 100);
            //TODO CC configurable
            _tickRequestMessage = TimerMessage.Schedule.Create(TimeSpan.FromMilliseconds(1000),
                                                               new PublishEnvelope(_bus),
                                                               new SubscriptionMessage.PersistentSubscriptionTimerTick());
        }
Beispiel #5
0
 /// <summary>
 /// Sets the checkpoint reader for the instance
 /// </summary>
 /// <param name="reader"></param>
 /// <returns></returns>
 public PersistentSubscriptionParamsBuilder WithCheckpointReader(IPersistentSubscriptionCheckpointReader reader)
 {
     _checkpointReader = reader;
     return(this);
 }
 /// <summary>
 /// Sets the checkpoint reader for the instance
 /// </summary>
 /// <param name="reader"></param>
 /// <returns></returns>
 public PersistentSubscriptionParamsBuilder WithCheckpointReader(IPersistentSubscriptionCheckpointReader reader)
 {
     _checkpointReader = reader;
     return this;
 }
Beispiel #7
0
 WithCheckpointReader(IPersistentSubscriptionCheckpointReader reader)
 {
     _checkpointReader = reader;
     return(this);
 }