public void ReadProjectionIndexCheckpointRequests_are_forwarded_to_worker()
        {
            var o = new TestContainer(this);

            var req = new ReadProjectionCheckpointRequest("a");
            o.Reader.Tell(req);

            o.ReadProjectionIndexCheckpointProbe.ExpectMsg<ReadProjectionCheckpointRequest>(m => m == req);
        }
Exemple #2
0
        public ProjectionStream(ProjectionStreamQuery query, IActorRef reader, IActorRef writer, GlobalOptions options, Props replayWorkerProps)
        {
            _query = query;
            _reader = reader;
            _writer = writer;
            _options = options;
            _replayWorkerProps = replayWorkerProps ?? Props.Create<ProjectionReplayWorker>();

            // subscribe to events in the stream
            Context.System.EventStream.Subscribe(Self, typeof(IPersistedEvent));

            // request checkpoint
            var request = new ReadProjectionCheckpointRequest(_query.ProjectionStream);
            _lastRequestId = request.RequestID;
            _reader.Tell(request);

            Become(AwaitingCheckpoint);
        }