共用方式為


ServiceBusProcessorOptions.AutoCompleteMessages Property

Definition

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.

public bool AutoCompleteMessages { get; set; }
member this.AutoCompleteMessages : bool with get, set
Public Property AutoCompleteMessages As Boolean

Property Value

true to complete the message automatically on successful execution of the message handler; otherwise, false. The default value is true.

Remarks

If the message handler triggers an exception and did not settle the message, then the message will be automatically abandoned, irrespective of AutoCompleteMessages.

Applies to