Concept and mechanism
Service Bus separates receipt, processing, and settlement. With PeekLock, complete after persisting the necessary effect and prepare idempotency for lost settlement. A queue with competing consumers distributes work; a topic with subscriptions supports independent flows. Duplicate detection compares MessageId within a window and does not turn external effects into exactly-once transactions. The DLQ retains work needing diagnosis, correction, and controlled reprocessing. Event Grid also requires consumers that tolerate duplicates and different ordering. Subject or property filters select events; they do not replace endpoint authentication. Choose the service and pattern around the delivery and recovery contract the business needs.
Guided application
A Function has one trigger starting execution and can use bindings to integrate inputs and outputs. Permissions remain necessary. In Python, async def benefits from concurrency only when I/O does not block the event loop or is appropriately isolated. For long work, persist the request in a queue or durable orchestration and return acceptance with queryable status; a local thread after the response can disappear with the host. In fictional processing, the result was saved but Complete failed. On redelivery, check the business key and avoid repeating the effect. Retries should distinguish transient failures, respect budgets, and limit pressure. Define DLQ ownership, escalation timing, and how reconciliation is established before declaring the batch complete.
Persisted effect + lost Complete = possible redelivery. The business key allows recognizing the already applied operation.
Common pitfalls
Receipt as completion; broker deduplication as exactly once; empty DLQ achieved by deleting work; async with blocking I/O; 200 as durable work.
Related topics: Containers, artifacts, and revisions · Cosmos DB, vectors, and change feed · PostgreSQL, vectors, and caching
Separate acceptance, execution, and settlement with recovery and idempotent effects.
Reference: Service Bus locks and settlement · AI-200 current guide updated2026-05-05; Azure technical documentation2026-09-30