Udostępnij za pośrednictwem


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
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.

Identifier

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.

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

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.

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.

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