Share via

ServiceBusSessionProcessorOptions Class


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





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.


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


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. To specify an infinite duration, use InfiniteTimeSpan.


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.


Gets or sets the maximum number of sessions that can be processed concurrently by the processor.


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.


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


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.


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