Sprache

ServiceBusSessionReceiverOptions Class

Definition

The set of options that can be specified when creating a ServiceBusSessionReceiver to configure its behavior.

public class ServiceBusSessionReceiverOptions
type ServiceBusSessionReceiverOptions = class
Public Class ServiceBusSessionReceiverOptions
Inheritance
ServiceBusSessionReceiverOptions

Constructors

Name Description
ServiceBusSessionReceiverOptions()

Properties

Name Description
EnableNonExclusiveSession

Gets or sets a value indicating whether the session is locked non-exclusively, allowing another receiver to cooperatively take over the session by presenting its SessionLockToken. When false (the default), the session is locked exclusively and no other receiver can access it until the lock is released.

Identifier

A property used to set the ServiceBusReceiver ID to identify the client. This can be used to correlate logs and exceptions. If null or empty, a random unique value will be used.

PrefetchCount

Gets or sets the number of messages that will be eagerly requested from Queues or Subscriptions and queued locally without regard to whether the receiver is actively receiving, intended to help maximize throughput by allowing the receiver to receive from a local cache rather than waiting on a service request.

ReceiveMode

Gets or sets the ReceiveMode used to specify how messages are received. Defaults to PeekLock mode.

SessionLockToken

Gets or sets the session lock token to present when cooperatively taking over a non-exclusive session. This must be the token previously assigned by the service to the session, as reported by SessionLockToken on the receiver that currently holds it, and is only valid when EnableNonExclusiveSession is true and a specific session is being accepted (validated when the receiver is created).

Applies to