Why is ResolvedEvent.OriginalPosition null?

What causes ResolvedEvent.OriginalPosition to be null or not-null ?

I was hoping to be able to match the position from a WriteResult til the OriginalPosition of some event to detect wheter or not a given write has been processed by a query-model (expecting these positions to be global across aggregates)

Something like this (conceptually during testing):

writeResult = await es.WriteEvents(…)

await queryModel.WaitForPosition(writeResult.Position)

Task WaitForPosition(Position pos)

{

while(…)

{

if (LastReceived_OriginalPosition >= pos)

return;

await Sleep(…)

}

}

All I receive from _connection.ReadStreamEventsForwardAsync(stream, start, count, true) is null positions

/Thomas

Original position is for linked events IIRC. Since you are reading from a stream that you are writing to, you don’t even need to resolve link events - in fact GES doesn’t like it when a GES projection writes to a stream that something else is. Try setting the last parameter to false.