ServiceBusSessionProcessorOptions Class

Definition

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

public class ServiceBusSessionProcessorOptions
type ServiceBusSessionProcessorOptions = class
Public Class ServiceBusSessionProcessorOptions
Inheritance
System.Object
ServiceBusSessionProcessorOptions

Constructors

ServiceBusSessionProcessorOptions()

Properties

AutoCompleteMessages

Gets or sets a value that indicates whether the processor should automatically complete messages after the ProcessMessageAsync handler has completed processing. If the message handler triggers an exception, the message will not be automatically completed. The default value is true.

MaxAutoLockRenewalDuration

Gets or sets the maximum duration within which the session lock will be renewed automatically. This value should be greater than the queue's LockDuration Property.

MaxConcurrentCallsPerSession

Gets or sets the maximum number of concurrent calls to the message handler the processor should initiate per session. Thus the total number of concurrent calls will be equal to MaxConcurrentSessions * MaxConcurrentCallsPerSession. The default value is 1.

MaxConcurrentSessions

Gets or sets the maximum number of sessions that can be processed concurrently by the processor. The default value is 8.

PrefetchCount

Gets or sets the number of messages that will be eagerly requested from Queues or Subscriptions and queued locally, intended to help maximize throughput by allowing the processor 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.

SessionIdleTimeout

Gets or sets the maximum amount of time to wait for a message to be received for the currently active session. After this time has elapsed, the processor will close the session and attempt to process another session. If not specified, the TryTimeout will be used.

SessionIds

Gets an optional list of session IDs to scope the ServiceBusSessionProcessor to. If the list is left empty, the processor will not be limited to any specific session IDs.

Applies to