public Task <EventStorePersistentSubscriptionBase> ConnectToPersistentSubscriptionAsync( string stream, string groupName, Action <EventStorePersistentSubscriptionBase, ResolvedEvent> eventAppeared, Action <EventStorePersistentSubscriptionBase, SubscriptionDropReason, Exception> subscriptionDropped = null, UserCredentials userCredentials = null, int bufferSize = 10, bool autoAck = true) { var subscription = new EmbeddedEventStorePersistentSubscription(groupName, stream, eventAppeared, subscriptionDropped, GetUserCredentials(_settings, userCredentials), _settings.Log, _settings.VerboseLogging, _settings, _subscriptions, bufferSize, autoAck); return(subscription.Start()); }
public EventStorePersistentSubscriptionBase ConnectToPersistentSubscription( string stream, string groupName, Action <EventStorePersistentSubscriptionBase, ResolvedEvent> eventAppeared, Action <EventStorePersistentSubscriptionBase, SubscriptionDropReason, Exception> subscriptionDropped = null, UserCredentials userCredentials = null, int bufferSize = 10, bool autoAck = true) { Ensure.NotNullOrEmpty(groupName, "groupName"); Ensure.NotNullOrEmpty(stream, "stream"); Ensure.NotNull(eventAppeared, "eventAppeared"); var subscription = new EmbeddedEventStorePersistentSubscription(groupName, stream, eventAppeared, subscriptionDropped, GetUserCredentials(_settings, userCredentials), _settings.Log, _settings.VerboseLogging, _settings, _subscriptions, bufferSize, autoAck); subscription.Start().Wait(); return(subscription); }
public EventStorePersistentSubscriptionBase ConnectToPersistentSubscription( string stream, string groupName, Action<EventStorePersistentSubscriptionBase, ResolvedEvent> eventAppeared, Action<EventStorePersistentSubscriptionBase, SubscriptionDropReason, Exception> subscriptionDropped = null, UserCredentials userCredentials = null, int bufferSize = 10, bool autoAck = true) { Ensure.NotNullOrEmpty(groupName, "groupName"); Ensure.NotNullOrEmpty(stream, "stream"); Ensure.NotNull(eventAppeared, "eventAppeared"); var subscription = new EmbeddedEventStorePersistentSubscription(groupName, stream, eventAppeared, subscriptionDropped, GetUserCredentials(_settings, userCredentials), _settings.Log, _settings.VerboseLogging, _settings, _subscriptions, bufferSize, autoAck); subscription.Start(); return subscription; }
public Task<EventStorePersistentSubscriptionBase> ConnectToPersistentSubscriptionAsync( string stream, string groupName, Action<EventStorePersistentSubscriptionBase, ResolvedEvent> eventAppeared, Action<EventStorePersistentSubscriptionBase, SubscriptionDropReason, Exception> subscriptionDropped = null, UserCredentials userCredentials = null, int bufferSize = 10, bool autoAck = true) { var subscription = new EmbeddedEventStorePersistentSubscription(groupName, stream, eventAppeared, subscriptionDropped, GetUserCredentials(_settings, userCredentials), _settings.Log, _settings.VerboseLogging, _settings, _subscriptions, bufferSize, autoAck); return subscription.Start(); }