The existing regional Azure SQL database was used as the durable outbox, written in the same transaction as encounter completion. A versioned script added the outbox table, and the drainer claims rows with SQL Server update locks and read-past hints. Unit tests around the JDBC outbox passed. No connection to a live Azure SQL server was made.
- What worked
- The regional database already matched the residency boundary, and a transactional outbox fit the existing store better than an in-memory spool. Locking hints gave a clear claim pattern for concurrent publishers.