Hi!
Once more it is me again
Following use case:
-
Once a day we have to import events from multiple external sources into the Event Store.
-
Performance is not that important when importing, performance is only important later on when processing the events.
-
We are not allowed to lose any event in this import process, never, ever.
-
If our process dies for some reason we must now what has been the last committed event for each source.
Using NEventStore up to now we’ve enlisted the NEventStore in the ambient transaction, i.e. the following code ensured the process’ consistency:
using(var tx = new TransactionScope(…))
{
// (1) load some events from external source X
// (2) write the events to the eventstore
// (3) write new “checkpoint” for source X to a database
tx.Commit(); // transactional safe eventstore-write + checkpoint-write
}
How would one do that with the EventStore where you cannot (?) use TransactionScopes. Is there any other way to connect a SQL server transaction with an Event Store transaction?
Other ideas?
Best regards,
Dominik