Question 300
For this Azure AI backend: An embedding job takes six minutes, but its Service Bus message lock expires while processing and another worker receives it. Which corrective design should the engineer implement?
Explanation
Correct Answer
Configure supported auto-renew and idempotent processing for the long-running handler. The scenario specifically states: An embedding job takes six minutes, but its Service Bus message lock expires while processing and another worker receives it. PeekLock delivery requires lock renewal or bounded work splitting when processing exceeds lock duration. This change targets the named service and constraints rather than a different workflow. Validate the result by checking A controlled long job completes without unintended parallel duplicate settlement. The important remaining qualification is: Auto-renew cannot provide unlimited locks or survive every process crash.
Incorrect Answers
Service Bus auto-forwarding can transfer messages from a source entity to a destination in compatible namespace configurations. That addresses a different mechanism; this question turns on Configure supported auto-renew and idempotent processing for the long-running.
Event Grid event delivery is at-least-once with retry behavior according to configured policy. In the present case the governing issue is PeekLock delivery requires lock renewal or bounded work splitting, which this does not resolve.
Event Grid is not a general ordered transaction log and consumers must tolerate ordering/replay variations. That observation may hold without resolving the relevant issue: Configure supported auto-renew and idempotent processing for the long-running.