SessionHandlerOptions 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.
Provides options associated with session pump processing using RegisterSessionHandler(Func<IMessageSession,Message,CancellationToken,Task>, SessionHandlerOptions) and RegisterSessionHandler(Func<IMessageSession,Message,CancellationToken,Task>, SessionHandlerOptions).
public sealed class SessionHandlerOptions
type SessionHandlerOptions = class
Public NotInheritable Class SessionHandlerOptions
- Inheritance
-
SessionHandlerOptions
Constructors
SessionHandlerOptions(Func<ExceptionReceivedEventArgs,Task>) |
Initializes a new instance of the SessionHandlerOptions class. Default Values: MaxConcurrentSessions = 2000 AutoComplete = true MessageWaitTimeout = 1 minute MaxAutoRenewDuration = 5 minutes |
Properties
AutoComplete |
Gets or sets whether the autocomplete option for messages in the session handler is enabled. If this value is true, if the handler returns without any failure, then the message is completed and will not show up in the session; if any exception is thrown from the handler, the message is abandoned and the DeliveryCount of this message will increase by one. If this value is false, if the handler returns without any failure, then user has to write the logic to explicitly complete the message, otherwise the message is not considered 'completed' and will reappear in the session. |
ExceptionReceivedHandler |
Occurs when an exception is received. Enables you to be notified of any errors encountered by the session pump. When errors are received calls will automatically be retried, so this is informational. |
MaxAutoRenewDuration |
Gets or sets the duration for which the session lock will be renewed automatically. If a session lock is going to expire, this value is the max duration for the session lock to be automatically renewed. |
MaxConcurrentSessions |
Gets or sets the maximum number of existing sessions that the User wants to handle concurrently. Setting this value to be greater than the max number of active sessions in the service will not increase message throughput. |
MessageWaitTimeout |
Gets or sets the timeout to wait for receiving a message. This is the time the session-pump waits before closing down the current session and switching to a different session. |