Example #1
0
        public Task <IEventStreamConsumer> CreateSubscriptionConsumerAsync(string streamName)
        {
            Require.NotEmpty(streamName, "streamName");

            Ensure.False(m_processingCountdown.IsSet, "Subscription is not activated.");

            return(m_connection.CreateStreamConsumerAsync(config => config
                                                          .WithName(GetConsumerId())
                                                          .ReadStream(streamName)
                                                          .AutoCommitProcessedStreamPosition(false)));
        }
Example #2
0
        public static Task <IEventStreamConsumer> CreateStreamConsumerAsync(this IEventStoreConnection connection, string streamName)
        {
            Require.NotNull(connection, "connection");

            return(connection.CreateStreamConsumerAsync(config => config.ReadStream(streamName)));
        }