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;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Sets the size of the read batch used when paging in history for the subscription
 /// sizes should not be too big ...
 /// </summary>
 /// <returns>A new <see cref="PersistentSubscriptionParamsBuilder"></see></returns>
 public PersistentSubscriptionParamsBuilder WithNamedConsumerStrategy(
     IPersistentSubscriptionConsumerStrategy consumerStrategy)
 {
     Ensure.NotNull(consumerStrategy, "consumerStrategy");
     _consumerStrategy = consumerStrategy;
     return(this);
 }
 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;
 }
Exemplo n.º 4
0
 private PersistentSubscriptionParamsBuilder(string subscriptionId, string streamName, string groupName, bool resolveLinkTos, int startFrom, bool recordStatistics, TimeSpan timeout,
                                             int historyBufferSize, int liveBufferSize, int maxRetryCount, int readBatchSize, TimeSpan checkPointAfter,
                                             int minCheckPointCount, int maxCheckPointCount, int maxSubscriptionCount, IPersistentSubscriptionConsumerStrategy consumerStrategy)
 {
     _resolveLinkTos     = resolveLinkTos;
     _startFrom          = startFrom;
     _recordStatistics   = recordStatistics;
     _timeout            = timeout;
     _historyBufferSize  = historyBufferSize;
     _liveBufferSize     = liveBufferSize;
     _maxRetryCount      = maxRetryCount;
     _readBatchSize      = readBatchSize;
     _eventStreamId      = streamName;
     _subscriptionId     = subscriptionId;
     _groupName          = groupName;
     _checkPointAfter    = checkPointAfter;
     _minCheckPointCount = minCheckPointCount;
     _maxCheckPointCount = maxCheckPointCount;
     _maxSubscriberCount = maxSubscriptionCount;
     _consumerStrategy   = consumerStrategy;
 }
 private PersistentSubscriptionParamsBuilder(string subscriptionId, string streamName, string groupName, bool resolveLinkTos, int startFrom, bool recordStatistics, TimeSpan timeout,
     int historyBufferSize, int liveBufferSize, int maxRetryCount, int readBatchSize, TimeSpan checkPointAfter,
     int minCheckPointCount, int maxCheckPointCount, int maxSubscriptionCount, IPersistentSubscriptionConsumerStrategy consumerStrategy)
 {
     _resolveLinkTos = resolveLinkTos;
     _startFrom = startFrom;
     _recordStatistics = recordStatistics;
     _timeout = timeout;
     _historyBufferSize = historyBufferSize;
     _liveBufferSize = liveBufferSize;
     _maxRetryCount = maxRetryCount;
     _readBatchSize = readBatchSize;
     _eventStreamId = streamName;
     _subscriptionId = subscriptionId;
     _groupName = groupName;
     _checkPointAfter = checkPointAfter;
     _minCheckPointCount = minCheckPointCount;
     _maxCheckPointCount = maxCheckPointCount;
     _maxSubscriberCount = maxSubscriptionCount;
     _consumerStrategy = consumerStrategy;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Sets the consumer strategy to the one provided.
 /// </summary>
 /// <param name="consumerStrategy"></param>
 /// <returns></returns>
 public PersistentSubscriptionParamsBuilder CustomConsumerStrategy(IPersistentSubscriptionConsumerStrategy consumerStrategy)
 {
     _consumerStrategy = consumerStrategy;
     return(this);
 }
Exemplo n.º 7
0
 /// <summary>
 /// If set the subscription will prefer if possible to dispatch only to a single of the connected
 /// clients. If however the buffer limits are reached on that client it will begin sending to other
 /// clients.
 /// </summary>
 /// <returns>A new <see cref="PersistentSubscriptionParamsBuilder"></see></returns>
 public PersistentSubscriptionParamsBuilder PreferDispatchToSingle()
 {
     _consumerStrategy = new DispatchToSinglePersistentSubscriptionConsumerStrategy();
     return(this);
 }
Exemplo n.º 8
0
 /// <summary>
 /// If set the subscription will prefer if possible to round robin between the clients that
 /// are connected.
 /// </summary>
 /// <returns>A new <see cref="PersistentSubscriptionParamsBuilder"></see></returns>
 public PersistentSubscriptionParamsBuilder PreferRoundRobin()
 {
     _consumerStrategy = new RoundRobinPersistentSubscriptionConsumerStrategy();
     return(this);
 }
Exemplo n.º 9
0
 public PersistentSubscriptionClientCollection(IPersistentSubscriptionConsumerStrategy consumerStrategy)
 {
     _consumerStrategy = consumerStrategy;
 }
 public PersistentSubscriptionClientCollection(IPersistentSubscriptionConsumerStrategy consumerStrategy)
 {
     _consumerStrategy = consumerStrategy;
 }
 /// <summary>
 /// Sets the size of the read batch used when paging in history for the subscription
 /// sizes should not be too big ...
 /// </summary>
 /// <returns>A new <see cref="PersistentSubscriptionParamsBuilder"></see></returns>
 public PersistentSubscriptionParamsBuilder WithNamedConsumerStrategy(IPersistentSubscriptionConsumerStrategy consumerStrategy)
 {
     Ensure.NotNull(consumerStrategy, "consumerStrategy");
     _consumerStrategy = consumerStrategy;
     return this;
 }
 /// <summary>
 /// If set the subscription will prefer if possible to dispatch only to a single of the connected
 /// clients. If however the buffer limits are reached on that client it will begin sending to other 
 /// clients.
 /// </summary>
 /// <returns>A new <see cref="PersistentSubscriptionParamsBuilder"></see></returns>
 public PersistentSubscriptionParamsBuilder PreferDispatchToSingle()
 {
     _consumerStrategy = new DispatchToSinglePersistentSubscriptionConsumerStrategy();
     return this;
 }
 /// <summary>
 /// If set the subscription will prefer if possible to round robin between the clients that
 /// are connected.
 /// </summary>
 /// <returns>A new <see cref="PersistentSubscriptionParamsBuilder"></see></returns>
 public PersistentSubscriptionParamsBuilder PreferRoundRobin()
 {
     _consumerStrategy = new RoundRobinPersistentSubscriptionConsumerStrategy();
     return this;
 }
 /// <summary>
 /// Sets the consumer strategy to the one provided.
 /// </summary>
 /// <param name="consumerStrategy"></param>
 /// <returns></returns>
 public PersistentSubscriptionParamsBuilder CustomConsumerStrategy(IPersistentSubscriptionConsumerStrategy consumerStrategy)
 {
     _consumerStrategy = consumerStrategy;
     return this;
 }