How to use MSSQL and FILES EventStore same time?
IRootResolver rootResolver = EventFlowOptions.New ... .UseMssqlEventStore() .UseFilesEventStore(storePath) .CreateResolver();
it will be only record the event to files.
Obviously you have to create a wrapper which implements IEventStore interface and internally has dependencies on desired stores then calls these dependencies
@ppXD I wouldn't recommend it as you would most likely end up in a inconsistent state, e.g. if a optimistic concurrency exceptions happen in one and not in the other event store. Personally I like to think the event store as the single source of truth, so having two of them defeats that.
If you simply would like to create a backup of all events emitted, then register the ISubscribeSynchronousToAll and then use the IEventJsonSerializer to serialize the events to JSON. Writing these to disk should then be trivial.
As a side note. I am working on an event archive function for EventFlow, but don't know when its going to be ready as I'm trying to implement event streams (which is a mess right now) as part of it (handling cases were you can't load all events into memory).
@rasmus Thank you very much, Implement ISubscribeSynchronousToAll interface is a good solution.
The question for this is that I recently used EventFlow for my project. Because the Serilog Framework provide write log to multiple places same time.