Study FAQ
How do I make a long-running Dataverse job recoverable in Azure Functions?
Also asked as 2
- How can an Azure Function acknowledge a Dataverse job and recover it after a worker stops?
- What should an Azure Functions job store to resume Dataverse work and avoid duplicate results?
Answer
Persist a job and its acceptance identity before acknowledging a long-running Dataverse request. Make dispatch recoverable, let a worker claim and checkpoint bounded units, and record success only after the business result is durable. The client can keep the job ID and inspect an authorized status endpoint instead of keeping the submission connection open. Azure asynchronous request-reply pattern · Azure Functions reliability guidance
Use an application-defined submission key scoped to the caller, tenant and operation, and return the same job for a repeat with the same business payload. Reject a different payload with the same key. Save the accepted payload version and target alongside the job, and return HTTP 202 after the dispatch path owns the work. Use a durable dispatch marker or reconciliation pass to find saved jobs that were never published. A dispatcher can also repeat a send after a lost acknowledgement, so delivery must tolerate duplicates. Asynchronous request-reply · Transactional outbox pattern
Store a current claim or lease, its expiry and last progress. Protect progress and terminal updates against a stale worker that resumes after losing ownership. Use a stable result identity and enforce its uniqueness where the result is stored. After interruption between result persistence and job completion, recover the existing result before marking the job Succeeded. Keep Failed distinct from a still-recoverable attempt. Test by losing the submission response, delivering work twice and stopping processing just after a result write. Confirm one durable result and an authorized status response. Azure Functions idempotency and reliability · Dataverse alternate keys
Full explanation
AB-400: Azure Functions for Power Platform Workloads
Study guide · AB-400
Read the full explanation