Search code examples
sql-servermasstransit

Transactional outbox and inbox with optimistic concurrency control


is it possible to configure MassTransit transactional outbox and inbox with optimistic concurrency control instead of locks? In my database I have transactions with optimistic concurrency control and I want send messages to be saved as part of this transaction - how can I do that? I suppose I cannot have in the same transaction both locks and optimistic conccurency? I'm using mssql


Solution

  • Locks are required to ensure exactly once consumer semantics. The Transactional Outbox was designed with this in mind, and therefore requires it.