ProcessorReceiveActions.ReceiveDeferredMessagesAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Receives a list of deferred ServiceBusReceivedMessage identified by sequenceNumbers
.
Messages received using this method are subject to the behavior defined in the AutoCompleteMessages
and MaxAutoLockRenewalDuration properties.
public virtual System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Azure.Messaging.ServiceBus.ServiceBusReceivedMessage>> ReceiveDeferredMessagesAsync (System.Collections.Generic.IEnumerable<long> sequenceNumbers, System.Threading.CancellationToken cancellationToken = default);
abstract member ReceiveDeferredMessagesAsync : seq<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Azure.Messaging.ServiceBus.ServiceBusReceivedMessage>>
override this.ReceiveDeferredMessagesAsync : seq<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Azure.Messaging.ServiceBus.ServiceBusReceivedMessage>>
Public Overridable Function ReceiveDeferredMessagesAsync (sequenceNumbers As IEnumerable(Of Long), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyList(Of ServiceBusReceivedMessage))
Parameters
- sequenceNumbers
- IEnumerable<Int64>
An IEnumerable<T> containing the sequence numbers to receive.
- cancellationToken
- CancellationToken
An optional CancellationToken instance to signal the request to cancel the operation.
Returns
Messages identified by sequence number are returned. Throws if the messages have not been deferred.
Exceptions
The specified sequence number does not correspond to a message that has been deferred. The Reason will be set to MessageNotFound in this case.
Applies to
See also
Azure SDK for .NET