Skip to content

IQueueAdapterReceiver Methods

Receives batches of messages from a single partition of a message queue.

GetQueueMessagesAsync(int)

abstract
View source
[System.Obsolete(Use the overload which accepts a CancellationToken.)]
public abstract Task<IList<IBatchContainer>> GetQueueMessagesAsync(int maxCount)
Retrieves batches from a message queue.

Parameters

maxCountint
The maximum number of message batches to retrieve.

Returns

The message batches.

GetQueueMessagesAsync(int, CancellationToken)

virtual
View source
public virtual Task<IList<IBatchContainer>> GetQueueMessagesAsync(int maxCount, CancellationToken cancellationToken)
Retrieves batches from a message queue.

Parameters

maxCountint
The maximum number of message batches to retrieve.
cancellationTokenCancellationToken
The cancellation token.

Returns

The message batches.

Initialize(TimeSpan)

abstract
public abstract Task Initialize(TimeSpan timeout)
Initializes this receiver.

Parameters

timeoutTimeSpan

Returns

A System.Threading.Tasks.Task representing the operation.

MessagesDeliveredAsync(IList<IBatchContainer>)

abstract
View source
[System.Obsolete(Use the overload which accepts a CancellationToken.)]
public abstract Task MessagesDeliveredAsync(IList<IBatchContainer> messages)
Notifies the adapter receiver that the messages were delivered to all consumers, so the receiver can take an appropriate action (e.g., delete the messages from a message queue).

Parameters

messagesIList<IBatchContainer>
The message batches.

Returns

A System.Threading.Tasks.Task representing the operation.

MessagesDeliveredAsync(IList<IBatchContainer>, CancellationToken)

virtual
View source
public virtual Task MessagesDeliveredAsync(IList<IBatchContainer> messages, CancellationToken cancellationToken)
Notifies the adapter receiver that the messages were delivered to all consumers.

Parameters

messagesIList<IBatchContainer>
The message batches.
cancellationTokenCancellationToken
The cancellation token.

Returns

A System.Threading.Tasks.Task representing the operation.

Shutdown(TimeSpan)

abstract
public abstract Task Shutdown(TimeSpan timeout)
Receiver is no longer used. Shutdown and clean up.

Parameters

timeoutTimeSpan

Returns

A System.Threading.Tasks.Task representing the operation.