Пример #1
0
        public void Start()
        {
            var readerStrategy = ReaderStrategy.Create(
                _querySource.ToJson(),                 // tag
                0,
                _querySource,
                _timeProvider,
                stopOnEof: true,
                runAs: _user);

            //TODO: make reader mode explicit
            var readerOptions = new ReaderSubscriptionOptions(
                1024 * 1024,
                checkpointAfterMs: 10000,
                checkpointProcessedEventsThreshold: null,
                stopOnEof: true,
                stopAfterNEvents: _maxEvents,
                // The projection must be stopped for debugging, so will enable content type validation automatically
                enableContentTypeValidation: true);

            _subscriptionId =
                _subscriptionDispatcher.PublishSubscribe(
                    new ReaderSubscriptionManagement.Subscribe(
                        Guid.NewGuid(), _fromPosition, readerStrategy, readerOptions), this);
        }
Пример #2
0
        public void Start()
        {
            var readerStrategy = ReaderStrategy.Create(0, _querySource, _timeProvider, stopOnEof: true, runAs: _user);
            //TODO: make reader mode explicit
            var readerOptions = new ReaderSubscriptionOptions(
                1024 * 1024, _maxEvents + 1, stopOnEof: true, stopAfterNEvents: _maxEvents);

            _subscriptionId =
                _subscriptionDispatcher.PublishSubscribe(
                    new ReaderSubscriptionManagement.Subscribe(
                        Guid.NewGuid(), _fromPosition, readerStrategy, readerOptions), this);
        }
Пример #3
0
        public void Start()
        {
            var readerStrategy = ReaderStrategy.Create(
                _querySource.ToJson(),                 // tag
                0,
                _querySource,
                _timeProvider,
                stopOnEof: true,
                runAs: _user);

            //TODO: make reader mode explicit
            var readerOptions = new ReaderSubscriptionOptions(
                1024 * 1024,
                checkpointAfterMs: 10000,
                checkpointProcessedEventsThreshold: null,
                stopOnEof: true,
                stopAfterNEvents: _maxEvents);

            _subscriptionId =
                _subscriptionDispatcher.PublishSubscribe(
                    new ReaderSubscriptionManagement.Subscribe(
                        Guid.NewGuid(), _fromPosition, readerStrategy, readerOptions), this);
        }