Quick expected version query

Hi,

I’m writing some code to use ES as a queue.

Given that I don’t know how many events will have previously been written to the stream and therefore don’t have an accurate version, am I safe using ExpectedVersion.Any, or will this produce undesired issues later on?

There could be multiple producers writing to the stream at once.

Any help/pointers appreciated.

Kind regards

Sean.

Do you need any form of concurrency control between the producers?

Hi Greg,

I don't with this particular feature but will later on. How would you manage this?
Cheers
Sean.

If you need to manage concurrency between multiple producers, that is
what expected version is for. If you just need to write (say as a
queue) just use expected version any.

Ok, What effect does using ExpectedVersion.Any have internally, is it just the order things are written?
Cheers
Sean.

yep exactly