Consider a Durable Function orchestration that calls multiple activity functions sequentially. If one activity function throws an exception, what is the default behavior of the orchestration?
Think about how Durable Functions handle transient failures with retry policies.
Durable Functions support retry policies for activity functions. When an activity fails, the orchestration retries it according to the policy. If retries are exhausted, the orchestration fails.
Durable Functions orchestrations are designed to manage workflows that require stateful coordination of multiple steps. Which architectural pattern do they best represent?
Consider how Durable Functions help manage long-running transactions and compensations.
Durable Functions orchestrations implement the Saga pattern, coordinating multiple steps and handling failures with compensations to maintain consistency.
You want to configure an activity function to retry up to 3 times with a 5-second delay between retries. Which code snippet correctly sets this retry policy in C#?
var retryOptions = new RetryOptions(TimeSpan.FromSeconds(5), 3); await context.CallActivityWithRetryAsync("ActivityName", retryOptions, input);
Check the order of parameters in the RetryOptions constructor: first delay, then max attempts.
The RetryOptions constructor takes the first parameter as the delay between retries and the second as the max number of attempts. Option B correctly sets 5 seconds delay and 3 retries.
You have sensitive connection strings and API keys used by your Durable Functions. What is the best practice to manage these secrets securely?
Think about centralized secret management services designed for security.
Azure Key Vault is the recommended service to securely store and manage secrets. Durable Functions can access secrets at runtime without exposing them in code or app settings.
In a long-running Durable Function orchestration, you call the method context.ContinueAsNew(input). What happens to the orchestration's state and execution?
Consider how to reset an orchestration's state while keeping the same instance ID.
The ContinueAsNew method ends the current orchestration and immediately starts a new one with the same instance ID but fresh state and new input. This helps avoid large history buildup.