Skip to content

Commit

Permalink
[service-bus] Fix autoCompleteMessages help to indicate that it'll bo…
Browse files Browse the repository at this point in the history
…th completeMessage() and abandonMessage() (#15658)

Updating doc comment for autoComplete, indicating that it will abandon() if an error is thrown.

The prior text made it sound like it would call complete() no matter what happened, which was confusing.

Fixes #15519
  • Loading branch information
richardpark-msft committed Jun 10, 2021
1 parent 0d45132 commit c300481
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions sdk/servicebus/service-bus/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,14 @@ export interface GetMessageIteratorOptions extends OperationOptionsBase {}
*/
export interface SubscribeOptions extends OperationOptionsBase {
/**
* Indicates whether the message should be settled using the `completeMessage()`
* method on the receiver automatically after it executes the user provided message callback.
* Doing so removes the message from the queue/subscription.
* Indicates whether the message should be settled automatically based on the result from the
* user provided `processMessage` callback.
*
* - If an error is thrown from the `processMessage` callback the message will be abandoned
* using `receiver.abandonMessage()`. Doing so will make the message available again from the
* queue/subscription and the delivery count will be incremented.
* - If NO error is thrown from `processMessage` the message will be completed
* using `receiver.completeMessage()`. Doing so removes the message from the queue/subscription.
*
* This option is ignored if messages are received in the `receiveAndDelete` receive mode or if
* the message is already settled in the user provided message callback.
Expand Down

0 comments on commit c300481

Please sign in to comment.