We’re looking into migrating our NServiceBus endpoints to Azure. We have 20+ endpoints all using the following configuration: SQL transport + NHibernate persistence + MSDTC. All endpoints use a single database for queues, subscriptions and timeouts. Each endpoint has its own database with business data.
We’re working on a migration strategy moving away from MSDTC. Our handler implementations are not idempotent. So besides re-implementing all handlers, we see these two options to mimic the DTC behavior:
- Use the outbox
- Use the synchronised session storage to reuse the NServiceBus SQL connection/transactions
- How is the same connection/transaction reused for both outbox and business data? Does this only work when business data is accessed using the SynchronizedStorageSession?
- If so, what’s the benefit of using the outbox when using the SQL transport and persistence and accessing business data using the SynchronizedStorageSession? Then they all share the same connection/transaction?
- When using the outbox, is it possible to keep subscriptions/timeouts in a shared database but store the outbox data in the ‘business’ database?