QueueStorage.QueueActivityAsync(Activity, Nullable<TimeSpan>, Nullable<TimeSpan>, CancellationToken) Method

Definition

Enqueues an Activity for later processing. The visibility timeout specifies how long the message should be invisible to Dequeue and Peek operations. The message content must be a UTF-8 encoded string that is up to 64KB in size.

public abstract System.Threading.Tasks.Task<string> QueueActivityAsync (Microsoft.Bot.Schema.Activity activity, TimeSpan? visibilityTimeout = default, TimeSpan? timeToLive = default, System.Threading.CancellationToken cancellationToken = default);
abstract member QueueActivityAsync : Microsoft.Bot.Schema.Activity * Nullable<TimeSpan> * Nullable<TimeSpan> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public MustOverride Function QueueActivityAsync (activity As Activity, Optional visibilityTimeout As Nullable(Of TimeSpan) = Nothing, Optional timeToLive As Nullable(Of TimeSpan) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Parameters

activity
Activity

The Activity to be queued for later processing.

visibilityTimeout
Nullable<TimeSpan>

Visibility timeout. Optional with a default value of 0. Cannot be larger than 7 days.

timeToLive
Nullable<TimeSpan>

Specifies the time-to-live interval for the message.

cancellationToken
CancellationToken

Cancellation token for the async operation.

Returns

Task<String>

A result string.

Applies to