Question 420
A company modernizes asynchronous workloads without changing transaction semantics. The team confirms that an integration event is lost when a producer fails between database commit and publish. What is the most appropriate correction?
Explanation
Correct Answer
The scenario identifies this requirement: An integration event is lost when a producer fails between database commit and publish. Select Use a transactional outbox or supported change-event pattern as the specified technical mechanism. Outbox coordination avoids lost events between commit and notification. This response addresses the problem described rather than a different design goal.
Incorrect Answers
The option Publish a confirmed payment event to a durable queue or event bus addresses a separate condition: a customer payment event has to trigger an independent fulfillment process. Event publication follows confirmed business state transitions. The actual requirement is an integration event is lost when a producer fails between database commit and publish. Recommended corrective action: Use a transactional outbox or supported change-event pattern. Outbox coordination avoids lost events between commit and notification.
Move noncritical downstream tasks to durable queued event processing would help if a web frontend calls three downstream services in sequence and fails when the slowest is unavailable. Async boundaries prevent optional dependencies from blocking user requests. That is not the symptom described here: an integration event is lost when a producer fails between database commit and publish. The matching response is Use a transactional outbox or supported change-event pattern, because outbox coordination avoids lost events between commit and notification.
For the alternative failure a web application has no idempotency design for client retries, the control Require unique request tokens and atomic duplicate detection is relevant: request idempotency preserves business semantics under retries. Here the evidence instead is an integration event is lost when a producer fails between database commit and publish. The selected technical mechanism is Use a transactional outbox or supported change-event pattern: outbox coordination avoids lost events between commit and notification.