Beispiel #1
0
        public EventStoreStreamCatchUpSubscription SubscribeToStreamFrom(string stream,
                                                                         int?lastCheckpoint,
                                                                         bool resolveLinkTos,
                                                                         Action <EventStoreCatchUpSubscription, ResolvedEvent> eventAppeared,
                                                                         Action <EventStoreCatchUpSubscription> liveProcessingStarted = null,
                                                                         Action <EventStoreCatchUpSubscription, SubscriptionDropReason, Exception> subscriptionDropped = null,
                                                                         UserCredentials userCredentials = null,
                                                                         int readBatchSize = 500)
        {
            Ensure.NotNullOrEmpty(stream, "stream");
            Ensure.NotNull(eventAppeared, "eventAppeared");
            var catchUpSubscription =
                new EventStoreStreamCatchUpSubscription(this, _settings.Log, stream, lastCheckpoint,
                                                        resolveLinkTos, userCredentials, eventAppeared,
                                                        liveProcessingStarted, subscriptionDropped, _settings.VerboseLogging, readBatchSize);

            catchUpSubscription.Start();
            return(catchUpSubscription);
        }
Beispiel #2
0
        public EventStoreStreamCatchUpSubscription SubscribeToStreamFrom(
            string stream,
            long?lastCheckpoint,
            CatchUpSubscriptionSettings settings,
            Action <EventStoreCatchUpSubscription, ResolvedEvent> eventAppeared,
            Action <EventStoreCatchUpSubscription> liveProcessingStarted = null,
            Action <EventStoreCatchUpSubscription, SubscriptionDropReason, Exception> subscriptionDropped = null,
            UserCredentials userCredentials = null)
        {
            Ensure.NotNullOrEmpty(stream, "stream");
            Ensure.NotNull(settings, "settings");
            Ensure.NotNull(eventAppeared, "eventAppeared");
            var catchUpSubscription =
                new EventStoreStreamCatchUpSubscription(this, _settings.Log, stream, lastCheckpoint,
                                                        userCredentials, eventAppeared, liveProcessingStarted,
                                                        subscriptionDropped, settings);

            catchUpSubscription.Start();
            return(catchUpSubscription);
        }
 public EventStoreStreamCatchUpSubscription SubscribeToStreamFrom(string stream,
     int? lastCheckpoint,
     bool resolveLinkTos,
     Action<EventStoreCatchUpSubscription, ResolvedEvent> eventAppeared,
     Action<EventStoreCatchUpSubscription> liveProcessingStarted = null,
     Action<EventStoreCatchUpSubscription, SubscriptionDropReason, Exception> subscriptionDropped = null,
     UserCredentials userCredentials = null,
     int readBatchSize = 500)
 {
     Ensure.NotNullOrEmpty(stream, "stream");
     Ensure.NotNull(eventAppeared, "eventAppeared");
     var catchUpSubscription =
         new EventStoreStreamCatchUpSubscription(this, _settings.Log, stream, lastCheckpoint,
             resolveLinkTos, GetUserCredentials(_settings, userCredentials), eventAppeared,
             liveProcessingStarted, subscriptionDropped, _settings.VerboseLogging, readBatchSize);
     catchUpSubscription.Start();
     return catchUpSubscription;
 }
 public EventStoreStreamCatchUpSubscription SubscribeToStreamFrom(
         string stream,
         int? lastCheckpoint,
         CatchUpSubscriptionSettings settings,
         Action<EventStoreCatchUpSubscription, ResolvedEvent> eventAppeared,
         Action<EventStoreCatchUpSubscription> liveProcessingStarted = null,
         Action<EventStoreCatchUpSubscription, SubscriptionDropReason, Exception> subscriptionDropped = null,
         UserCredentials userCredentials = null)
 {
     Ensure.NotNullOrEmpty(stream, "stream");
     Ensure.NotNull(settings, "settings");
     Ensure.NotNull(eventAppeared, "eventAppeared");
     var catchUpSubscription =
             new EventStoreStreamCatchUpSubscription(this, _settings.Log, stream, lastCheckpoint,
                                                     userCredentials, eventAppeared, liveProcessingStarted,
                                                     subscriptionDropped, settings);
     catchUpSubscription.Start();
     return catchUpSubscription;
 }