OnMessageOptions OnMessageOptions Class

Provides options associated with message pump processing using OnMessage(Action<BrokeredMessage>) and OnMessage(Action<BrokeredMessage>).

Syntax

Declaration

public sealed class OnMessageOptionsPublic NotInheritable Class OnMessageOptions

Inheritance Hierarchy

Constructors summary

Initializes a new instance of the OnMessageOptions class.

Properties summary

Gets or sets a value that indicates whether the message-pump should call Complete(Guid) or Complete(Guid) on messages after the callback has completed processing.

Gets or sets the maximum duration within which the lock will be renewed automatically. This value should be greater than the longest message lock duration; for example, the LockDuration Property.

Gets or sets the maximum number of concurrent calls to the callback the message pump should initiate.

Events summary

Occurs when an exception is received. Enables you to be notified of any errors encountered by the message pump. When errors are received calls will automatically be retried, so this is informational.

Constructors

  • OnMessageOptions()
    OnMessageOptions()

    Initializes a new instance of the OnMessageOptions class.

    public OnMessageOptions()Public Sub New

Properties

  • AutoComplete
    AutoComplete

    Gets or sets a value that indicates whether the message-pump should call Complete(Guid) or Complete(Guid) on messages after the callback has completed processing.

    public bool AutoComplete { get; set; }Public Property AutoComplete As Boolean

    Property Value

    • true to complete the message processing automatically on successful execution of the operation; otherwise, false.

  • AutoRenewTimeout
    AutoRenewTimeout

    Gets or sets the maximum duration within which the lock will be renewed automatically. This value should be greater than the longest message lock duration; for example, the LockDuration Property.

    public TimeSpan AutoRenewTimeout { get; set; }Public Property AutoRenewTimeout As TimeSpan

    Property Value

    • The maximum duration during which locks are automatically renewed.

  • MaxConcurrentCalls
    MaxConcurrentCalls

    Gets or sets the maximum number of concurrent calls to the callback the message pump should initiate.

    public int MaxConcurrentCalls { get; set; }Public Property MaxConcurrentCalls As Integer

    Property Value

    • The maximum number of concurrent calls to the callback.

Events

  • ExceptionReceived
    ExceptionReceived

    Occurs when an exception is received. Enables you to be notified of any errors encountered by the message pump. When errors are received calls will automatically be retried, so this is informational.

    public event EventHandler<ExceptionReceivedEventArgs> ExceptionReceivedPublic Event ExceptionReceived As EventHandler(Of ExceptionReceivedEventArgs)

Details

Assembly

Microsoft.ServiceBus.dll