Table of Contents

Class DurableTaskOptions

Namespace
Microsoft.Azure.WebJobs.Extensions.DurableTask
Assembly
Microsoft.Azure.WebJobs.Extensions.DurableTask.dll

Configuration options for the Durable Task extension.

public class DurableTaskOptions
Inheritance
DurableTaskOptions
Inherited Members

Constructors

DurableTaskOptions()

public DurableTaskOptions()

Properties

AzureStorageConnectionStringName

Gets or sets the name of the Azure Storage connection string used to manage the underlying Azure Storage resources.

public string AzureStorageConnectionStringName { get; set; }

Property Value

string

The name of a connection string that exists in the app's application settings.

Remarks

If not specified, the default behavior is to use the standard AzureWebJobsStorage connection string for all storage usage.

ControlQueueBatchSize

Gets or sets the number of messages to pull from the control queue at a time.

public int ControlQueueBatchSize { get; set; }

Property Value

int

A positive integer configured by the host. The default value is 32.

Remarks

Messages pulled from the control queue are buffered in memory until the internal dispatcher is ready to process them.

ControlQueueVisibilityTimeout

Gets or sets the visibility timeout of dequeued control queue messages.

public TimeSpan ControlQueueVisibilityTimeout { get; set; }

Property Value

TimeSpan

A TimeSpan configured by the host. The default is 5 minutes.

CustomLifeCycleNotificationHelperType

Gets or sets the type name of a custom to use for handling lifecycle notification events.

public string CustomLifeCycleNotificationHelperType { get; set; }

Property Value

string

Assembly qualified class name that implements ILifeCycleNotificationHelper.

EventGridKeySettingName

Gets or sets the name of the app setting containing the key used for authenticating with the Azure Event Grid custom topic at EventGridTopicEndpoint.

public string EventGridKeySettingName { get; set; }

Property Value

string

The name of the app setting that stores the Azure Event Grid key.

EventGridPublishEventTypes

Gets or sets the event types that will be published to Event Grid.

public string[] EventGridPublishEventTypes { get; set; }

Property Value

string[]

A list of strings. Possible values include 'Started', 'Completed', 'Failed', 'Terminated'.

EventGridPublishRetryCount

Gets or sets the Event Grid publish request retry count.

public int EventGridPublishRetryCount { get; set; }

Property Value

int

The number of retry attempts.

EventGridPublishRetryHttpStatus

Gets or sets the Event Grid publish request http status.

public int[] EventGridPublishRetryHttpStatus { get; set; }

Property Value

int[]

A list of HTTP status codes, e.g. 400, 403.

EventGridPublishRetryInterval

Gets orsets the Event Grid publish request retry interval.

public TimeSpan EventGridPublishRetryInterval { get; set; }

Property Value

TimeSpan

A TimeSpan representing the retry interval. The default value is 5 minutes.

EventGridTopicEndpoint

Gets or sets the URL of an Azure Event Grid custom topic endpoint. When set, orchestration life cycle notification events will be automatically published to this endpoint.

public string EventGridTopicEndpoint { get; set; }

Property Value

string

The Azure Event Grid custom topic URL.

Remarks

Azure Event Grid topic URLs are generally expected to be in the form https://{topic_name}.{region}.eventgrid.azure.net/api/events.

ExtendedSessionIdleTimeoutInSeconds

Gets or sets the amount of time in seconds before an idle session times out. The default value is 30 seconds.

public int ExtendedSessionIdleTimeoutInSeconds { get; set; }

Property Value

int

The number of seconds before an idle session times out.

Remarks

This setting is applicable when ExtendedSessionsEnabled is set to true.

ExtendedSessionsEnabled

Gets or sets a flag indicating whether to enable extended sessions.

public bool ExtendedSessionsEnabled { get; set; }

Property Value

bool

true to enable extended sessions; otherwise false.

Remarks

Extended sessions can improve the performance of orchestrator functions by allowing them to skip replays when new messages are received within short periods of time.

Note that orchestrator functions which are extended this way will continue to count against the MaxConcurrentOrchestratorFunctions limit. To avoid starvation, only half of the maximum number of allowed concurrent orchestrator functions can be concurrently extended at any given time. The ExtendedSessionIdleTimeoutInSeconds property can also be used to control how long an idle orchestrator function is allowed to be extended.

It is recommended that this property be set to false during development to help ensure that the orchestrator code correctly obeys the idempotency rules.

HubName

Gets or sets default task hub name to be used by all DurableOrchestrationClient, DurableOrchestrationContext, and DurableActivityContext instances.

public string HubName { get; set; }

Property Value

string

The name of the default task hub.

Remarks

A task hub is a logical grouping of storage resources. Alternate task hub names can be used to isolate multiple Durable Functions applications from each other, even if they are using the same storage backend.

LogReplayEvents

Gets or sets if logs for replay events need to be recorded.

public bool LogReplayEvents { get; set; }

Property Value

bool

Boolean value specifying if the replay events should be logged.

Remarks

The default value is false, which disables the logging of replay events.

MaxConcurrentActivityFunctions

Gets or sets the maximum number of activity functions that can be processed concurrently on a single host instance.

public int MaxConcurrentActivityFunctions { get; set; }

Property Value

int

A positive integer configured by the host. The default value is 10X the number of processors on the current machine.

Remarks

Increasing activity function concurrent can result in increased throughput but can also increase the total CPU and memory usage on a single worker instance.

MaxConcurrentOrchestratorFunctions

Gets or sets the maximum number of orchestrator functions that can be processed concurrently on a single host instance.

public int MaxConcurrentOrchestratorFunctions { get; set; }

Property Value

int

A positive integer configured by the host. The default value is 10X the number of processors on the current machine.

MaxQueuePollingInterval

Gets or sets the maximum queue polling interval.

public TimeSpan MaxQueuePollingInterval { get; set; }

Property Value

TimeSpan

Maximum interval for polling control and work-item queues.

NotificationUrl

Gets or sets the base URL for the HTTP APIs managed by this extension.

public Uri NotificationUrl { get; set; }

Property Value

Uri

A URL pointing to the hosted function app that responds to status polling requests.

Remarks

This property is intended for use only by runtime hosts.

PartitionCount

Gets or sets the partition count for the control queue.

public int PartitionCount { get; set; }

Property Value

int

A positive integer between 1 and 16. The default value is 4.

Remarks

Increasing the number of partitions will increase the number of workers that can concurrently execute orchestrator functions. However, increasing the partition count can also increase the amount of load placed on the storage account and on the thread pool if the number of workers is smaller than the number of partitions.

TraceInputsAndOutputs

Gets or sets a value indicating whether to trace the inputs and outputs of function calls.

public bool TraceInputsAndOutputs { get; set; }

Property Value

bool

true to trace the raw values of inputs and outputs; otherwise false.

Remarks

The default behavior when tracing function execution events is to include the number of bytes in the serialized inputs and outputs for function calls. This provides minimal information about what the inputs and outputs look like without bloating the logs or inadvertently exposing sensitive information to the logs. Setting TraceInputsAndOutputs to true will instead cause the default function logging to log the entire contents of function inputs and outputs.

TrackingStoreConnectionStringName

Gets or sets the name of the Azure Storage connection string to use for the durable tracking store (History and Instances tables).

public string TrackingStoreConnectionStringName { get; set; }

Property Value

string

The name of a connection string that exists in the app's application settings.

Remarks

If not specified, the AzureStorageConnectionStringName connection string is used for the durable tracking store.

This property is primarily useful when deploying multiple apps that need to share the same tracking infrastructure. For example, when deploying two versions of an app side by side, using the same tracking store allows both versions to save history into the same table, which allows clients to query for instance status across all versions.

TrackingStoreNamePrefix

Gets or sets the name prefix to use for history and instance tables in Azure Storage.

public string TrackingStoreNamePrefix { get; set; }

Property Value

string

The prefix to use when naming the generated Azure tables.

Remarks

This property is only used when TrackingStoreConnectionStringName is specified. If no prefix is specified, the default prefix value is "DurableTask".

WorkItemQueueVisibilityTimeout

Gets or sets the visibility timeout of dequeued work item queue messages.

public TimeSpan WorkItemQueueVisibilityTimeout { get; set; }

Property Value

TimeSpan

A TimeSpan configured by the host. The default is 5 minutes.