Purpose of commit and prepare position from WriteResult

Greetings,

I know what commit and prepare positions are about internally (What are those for the server) but I question

what the purpose of exposing those to the user, like in WriteResult for instance. I mean maybe when you want

to read $all stream but that’s it.

What I’m missing here ?

Thanks in advance.

Yorick.

As example you may want to write something that replicates data from
one node to another.

Here’s another use case: pass the position back to the client after a write, and track the position on your projection. Then the client can pass the position back into a query, and the server will know if the query is ‘stale’ or not.

Yes this can be used to provide read your own write semantics even if
read models are eventually consistent.

Thanks both of you for those examples !

Fwiw, that is exactly how we use it. Without it our system wouldn't really work.