I’m using the .NET API to write a set of events to Event Store using the AppendToStreamAsync method.
I’ve noticed the following error in my logs:
“EventStore.ClientAPI.Exceptions.CommandNotExpectedException: Expected : WriteEventsCompleted. Actual : WriteEvents.”
I’m not quite sure how to interpret this error because I’m not opening a transaction. I couldn’t find anything useful from a bit of googling and so was hoping someone would be able to enlighten me.
This is called once per message that I want to store.
I know this is not ideal in terms of not batching the events and calling wait, but the above are part of a library we’re using and so the application code does not have direct access to the Event Store API.
We’re using a client connected to a server. Anything else that would be useful to know?
There’s nothing obviously wrong with that code from first sight, but calling .Wait() has all kinds of bizaare side effects depending what thread it is running on etc. Are you able to reproduce this with your server using a simple Console app?