Q42 Service Bus Domain 3 · 20–25% of exam Priority · Real Exam

No order may be published without its database write succeeding. Which pattern satisfies this?

  1. A A Service Bus transaction spanning the database and the queue
  2. B The transactional outbox: write the event to an outbox table in the same database transaction, then relay it (correct answer)
  3. C Publish first, then write the order
  4. D Duplicate detection on the queue

Shortcut: Service Bus transactions cannot enlist an external database, so no distributed transaction is available. The outbox pattern makes the event part of the same local transaction as the order, and a relay publishes it afterwards, so the two can never diverge.