Editar

Compartir a través de


IAsyncObserver<T>.OnNextAsync(T, StreamSequenceToken) Method

Definition

Passes the next item to the consumer.

The Task returned from this method should be completed when the item's processing has been sufficiently processed by the consumer to meet any behavioral guarantees.

When the consumer is the (producer endpoint of) a stream, the Task is completed when the stream implementation has accepted responsibility for the item and is assured of meeting its delivery guarantees. For instance, a stream based on a durable queue would complete the Task when the item has been durably saved. A stream that provides best-effort at most once delivery would return a Task that is already complete.

When the producer is the (consumer endpoint of) a stream, the Task should be completed by the consumer code when it has accepted responsibility for the item. In particular, if the stream provider guarantees at-least-once delivery, then the item should not be considered delivered until the Task returned by the consumer has been completed.

public System.Threading.Tasks.Task OnNextAsync (T item, Orleans.Streams.StreamSequenceToken token = default);
public System.Threading.Tasks.Task OnNextAsync (T item, Orleans.Streams.StreamSequenceToken? token = default);
abstract member OnNextAsync : 'T * Orleans.Streams.StreamSequenceToken -> System.Threading.Tasks.Task
Public Function OnNextAsync (item As T, Optional token As StreamSequenceToken = Nothing) As Task

Parameters

item
T

The item to be passed.

token
StreamSequenceToken

The stream sequence token of this item.

Returns

A Task that is completed when the item has been accepted.

Applies to