NServiceBus.Persistence.Sql
NServiceBus.Persistence.Sql copied to clipboard
Allow using an external outbox and/or saga storage
Although in theory one might mix and match persistences via UsePersistence<T, TStorageType>
API, the SQL saga persistence can only work with SQL outbox persistence.
The seam between these two persistence concerns is ISqlStorageSession
. If we allow registering a custom storage adapter that can return an object that implements that interface we could use external outbox persistence.
Similarly, if we allow registering a custom adapter that takes ISqlOutboxTransaction
as an input we could use a custom saga storage.
I think this should be escalated for cross-repo feature consideration, since then in theory you can use any combination (or should we restrict possible combinations somehow?), e.g. Raven with SqlP or Raven with NHibernate...