ServiceBusSessionReceiver Class
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.
The ServiceBusSessionReceiver is responsible for receiving ServiceBusReceivedMessage and settling messages from session-enabled Queues and Subscriptions. It is constructed by calling AcceptNextSessionAsync(String, String, ServiceBusSessionReceiverOptions, CancellationToken).
public class ServiceBusSessionReceiver : Azure.Messaging.ServiceBus.ServiceBusReceiver
type ServiceBusSessionReceiver = class
inherit ServiceBusReceiver
Public Class ServiceBusSessionReceiver
Inherits ServiceBusReceiver
- Inheritance
Constructors
ServiceBusSessionReceiver() |
Initializes a new instance of the ServiceBusSessionReceiver class for mocking. |
Properties
EntityPath |
The path of the Service Bus entity that the receiver is connected to, specific to the Service Bus namespace that contains it. (Inherited from ServiceBusReceiver) |
FullyQualifiedNamespace |
The fully qualified Service Bus namespace that the receiver is associated with. This is likely
to be similar to |
Identifier |
A name used to identify the receiver client. If |
IsClosed |
Indicates whether or not this ServiceBusSessionReceiver has been closed by the user, or whether the underlying
session link was closed due to either losing the session lock or having the link disconnected. If this is |
PrefetchCount |
The number of messages that will be eagerly requested from Queues or Subscriptions and queued locally without regard to whether a processing is currently active, intended to help maximize throughput by allowing the receiver to receive from a local cache rather than waiting on a service request (Inherited from ServiceBusReceiver) |
ReceiveMode |
The ReceiveMode used to specify how messages are received. (Inherited from ServiceBusReceiver) |
SessionId |
The Session Id associated with the receiver. |
SessionLockedUntil |
Gets the DateTimeOffset that the receiver's session is locked until. |
Methods
AbandonMessageAsync(ServiceBusReceivedMessage, IDictionary<String,Object>, CancellationToken) |
Abandons a ServiceBusReceivedMessage.This will make the message available again for immediate processing as the lock on the message held by the receiver will be released. (Inherited from ServiceBusReceiver) |
CloseAsync(CancellationToken) |
Performs the task needed to clean up resources used by the ServiceBusReceiver. (Inherited from ServiceBusReceiver) |
CompleteMessageAsync(ServiceBusReceivedMessage, CancellationToken) |
Completes a ServiceBusReceivedMessage. This will delete the message from the service. (Inherited from ServiceBusReceiver) |
DeadLetterMessageAsync(ServiceBusReceivedMessage, IDictionary<String,Object>, CancellationToken) |
Moves a message to the dead-letter subqueue. (Inherited from ServiceBusReceiver) |
DeadLetterMessageAsync(ServiceBusReceivedMessage, IDictionary<String,Object>, String, String, CancellationToken) |
Moves a message to the dead-letter subqueue. (Inherited from ServiceBusReceiver) |
DeadLetterMessageAsync(ServiceBusReceivedMessage, String, String, CancellationToken) |
Moves a message to the dead-letter subqueue. (Inherited from ServiceBusReceiver) |
DeferMessageAsync(ServiceBusReceivedMessage, IDictionary<String,Object>, CancellationToken) |
Indicates that the receiver wants to defer the processing for the message. (Inherited from ServiceBusReceiver) |
DeleteMessagesAsync(Int32, Nullable<DateTimeOffset>, CancellationToken) |
Deletes up to |
DisposeAsync() |
Performs the task needed to clean up resources used by the ServiceBusReceiver. This is equivalent to calling CloseAsync(CancellationToken). (Inherited from ServiceBusReceiver) |
GetSessionStateAsync(CancellationToken) |
Gets the session state. |
PeekMessageAsync(Nullable<Int64>, CancellationToken) |
Fetches the next active ServiceBusReceivedMessage without changing the state of the receiver or the message source. (Inherited from ServiceBusReceiver) |
PeekMessagesAsync(Int32, Nullable<Int64>, CancellationToken) |
Fetches a list of active messages without changing the state of the receiver or the message source. (Inherited from ServiceBusReceiver) |
PurgeMessagesAsync(Nullable<DateTimeOffset>, CancellationToken) |
Attempts to purge all messages from an entity. Locked messages are not eligible for removal and will remain in the entity. (Inherited from ServiceBusReceiver) |
ReceiveDeferredMessageAsync(Int64, CancellationToken) |
Receives a deferred message identified by |
ReceiveDeferredMessagesAsync(IEnumerable<Int64>, CancellationToken) |
Receives a list of deferred messages identified by |
ReceiveMessageAsync(Nullable<TimeSpan>, CancellationToken) |
Receives a ServiceBusReceivedMessage from the entity using ReceiveMode mode. ReceiveMode defaults to PeekLock mode. (Inherited from ServiceBusReceiver) |
ReceiveMessagesAsync(CancellationToken) |
Receives messages as an asynchronous enumerable from the entity using ReceiveMode mode. ReceiveMode defaults to PeekLock mode. Messages will be received from the entity as the IAsyncEnumerable is iterated. If no messages are available, this method will continue polling until messages are available, i.e. it will never return null. (Inherited from ServiceBusReceiver) |
ReceiveMessagesAsync(Int32, Nullable<TimeSpan>, CancellationToken) |
Receives a list of ServiceBusReceivedMessage from the entity using ReceiveMode mode.
ReceiveMode defaults to PeekLock mode.
This method doesn't guarantee to return exact |
RenewMessageLockAsync(ServiceBusReceivedMessage, CancellationToken) |
Renews the lock on the message. The lock will be renewed based on the setting specified on the queue. (Inherited from ServiceBusReceiver) |
RenewSessionLockAsync(CancellationToken) |
Renews the lock on the session specified by the SessionId. The lock will be renewed based on the setting specified on the entity. |
SetSessionStateAsync(BinaryData, CancellationToken) |
Set a custom state on the session which can be later retrieved using GetSessionStateAsync(CancellationToken) |
Applies to
Azure SDK for .NET