public Task StartAsync(CancellationToken cancellationToken) { _cancellationToken = cancellationToken; _observable = _eventStoreSubscription .Buffer(TimeSpan.FromMilliseconds(TimeOutInMilliSeconds), BatchSize) .Where(buffer => buffer.Any()) .Subscribe(ProcessEvent, OnCompleted); _eventStoreSubscription.Connect(); _trace.Info("Observable subscription started."); _eventStoreSubscription.Start(cancellationToken, BatchSize); return(Task.FromResult(true)); }
public Task StartAsync(CancellationToken cancellationToken) { _cancellationToken = cancellationToken; _observable = _eventStoreSubscription .Buffer(TimeSpan.FromMilliseconds(_timeoutInMilliseconds), _batchSize) .Where(buffer => buffer.Any()).Subscribe(x => {}, OnCompleted); _eventStoreSubscription.Start(cancellationToken); return(Task.FromResult(true)); }