From c8157578effc63a74e0e5b7b348259b0eb0db731 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Thu, 7 May 2020 13:58:41 -0700 Subject: [PATCH 01/11] Improve doc comments for the various overloads. --- .../service-bus/src/serviceBusClient.ts | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sdk/servicebus/service-bus/src/serviceBusClient.ts b/sdk/servicebus/service-bus/src/serviceBusClient.ts index 002c34c9150c..9c806ccb23d9 100644 --- a/sdk/servicebus/service-bus/src/serviceBusClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusClient.ts @@ -79,25 +79,25 @@ export class ServiceBusClient { } /** - * Creates a receiver for an Azure Service Bus queue. + * Creates a receiver for an Azure Service Bus queue in peekLock mode. * * @param queueName The name of the queue to receive from. - * @param receiveMode The receive mode to use (defaults to PeekLock) + * @param receiveMode The receive mode, defaulted to peekLock. */ createReceiver(queueName: string, receiveMode: "peekLock"): Receiver; /** - * Creates a receiver for an Azure Service Bus queue. + * Creates a receiver for an Azure Service Bus queue in receiveAndDelete mode. * * @param queueName The name of the queue to receive from. - * @param receiveMode The receive mode to use (defaults to PeekLock) + * @param receiveMode The receive mode, defaulted to receiveAndDelete. */ createReceiver(queueName: string, receiveMode: "receiveAndDelete"): Receiver; /** - * Creates a receiver for an Azure Service Bus subscription. + * Creates a receiver for an Azure Service Bus subscription in peekLock mode. * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. - * @param receiveMode The receive mode to use (defaults to PeekLock) + * @param receiveMode The receive mode, defaulted to peekLock. */ createReceiver( topicName: string, @@ -105,11 +105,11 @@ export class ServiceBusClient { receiveMode: "peekLock" ): Receiver; /** - * Creates a receiver for an Azure Service Bus subscription. + * Creates a receiver for an Azure Service Bus subscription in receiveAndDelete mode. * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. - * @param receiveMode The receive mode to use (defaults to PeekLock) + * @param receiveMode The receive mode, defaulted to receiveAndDelete. */ createReceiver( topicName: string, @@ -152,10 +152,10 @@ export class ServiceBusClient { } /** - * Creates a receiver for an Azure Service Bus queue. + * Creates a receiver for an Azure Service Bus queue in peekLock mode. * * @param queueName The name of the queue to receive from. - * @param receiveMode The receive mode to use (defaults to PeekLock) + * @param receiveMode The receive mode, defaulted to peekLock. * @param options Options for the receiver itself. */ createSessionReceiver( @@ -164,10 +164,10 @@ export class ServiceBusClient { options?: CreateSessionReceiverOptions ): Promise>; /** - * Creates a receiver for an Azure Service Bus queue. + * Creates a receiver for an Azure Service Bus queue in receiveAndDelete mode. * * @param queueName The name of the queue to receive from. - * @param receiveMode The receive mode to use (defaults to PeekLock) + * @param receiveMode The receive mode, defaulted to receiveAndDelete. * @param options Options for the receiver itself. */ createSessionReceiver( @@ -176,11 +176,11 @@ export class ServiceBusClient { options?: CreateSessionReceiverOptions ): Promise>; /** - * Creates a receiver for an Azure Service Bus subscription. + * Creates a receiver for an Azure Service Bus subscription in peekLock mode. * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. - * @param receiveMode The receive mode to use (defaults to PeekLock) + * @param receiveMode The receive mode, defaulted to peekLock. * @param options Options for the receiver itself. */ createSessionReceiver( @@ -190,11 +190,11 @@ export class ServiceBusClient { options?: CreateSessionReceiverOptions ): Promise>; /** - * Creates a receiver for an Azure Service Bus subscription. + * Creates a receiver for an Azure Service Bus subscription in receiveAndDelete mode. * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. - * @param receiveMode The receive mode to use (defaults to PeekLock) + * @param receiveMode The receive mode, defaulted to receiveAndDelete. * @param options Options for the receiver itself. */ createSessionReceiver( @@ -271,31 +271,31 @@ export class ServiceBusClient { // } /** - * Creates a receiver for an Azure Service Bus queue's dead letter queue. + * Creates a receiver for an Azure Service Bus queue's dead letter queue in peekLock mode. * * @param queueName The name of the queue to receive from. - * @param receiveMode The receive mode to use (defaults to PeekLock) + * @param receiveMode The receive mode. */ createDeadLetterReceiver( queueName: string, receiveMode: "peekLock" ): Receiver; /** - * Creates a receiver for an Azure Service Bus queue's dead letter queue. + * Creates a receiver for an Azure Service Bus queue's dead letter queue in receiveAndDelete mode. * * @param queueName The name of the queue to receive from. - * @param receiveMode The receive mode to use (defaults to PeekLock) + * @param receiveMode The receive mode. */ createDeadLetterReceiver( queueName: string, receiveMode: "receiveAndDelete" ): Receiver; /** - * Creates a receiver for an Azure Service Bus subscription's dead letter queue. + * Creates a receiver for an Azure Service Bus subscription's dead letter queue in peekLock mode. * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. - * @param receiveMode The receive mode to use (defaults to PeekLock) + * @param receiveMode The receive mode. */ createDeadLetterReceiver( topicName: string, @@ -303,11 +303,11 @@ export class ServiceBusClient { receiveMode: "peekLock" ): Receiver; /** - * Creates a receiver for an Azure Service Bus subscription's dead letter queue. + * Creates a receiver for an Azure Service Bus subscription's dead letter queue in receiveAndDelete mode. * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. - * @param receiveMode The receive mode to use (defaults to PeekLock) + * @param receiveMode The receive mode. */ createDeadLetterReceiver( topicName: string, From 62c536314fa52bc6a31017e3f91dbad51c5d4e50 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Thu, 7 May 2020 14:44:13 -0700 Subject: [PATCH 02/11] Update documentation to reflect what the mode the user has chosen actually does. --- .../service-bus/src/serviceBusClient.ts | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/sdk/servicebus/service-bus/src/serviceBusClient.ts b/sdk/servicebus/service-bus/src/serviceBusClient.ts index 9c806ccb23d9..d1fe05f0152b 100644 --- a/sdk/servicebus/service-bus/src/serviceBusClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusClient.ts @@ -81,6 +81,11 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus queue in peekLock mode. * + * In peekLock mode, the receiver has a lock on the message for the duration specified on the + * queue or subscription. + * + * If the message is not settled during this time it becomes available to other receivers. + * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to peekLock. */ @@ -88,6 +93,9 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus queue in receiveAndDelete mode. * + * In receiveAndDelete mode, messages are automatically removed from Service Bus as they are + * received. + * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to receiveAndDelete. */ @@ -95,6 +103,11 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus subscription in peekLock mode. * + * In peekLock mode, the receiver has a lock on the message for the duration specified on the + * queue or subscription. + * + * If the message is not settled during this time it becomes available to other receivers. + * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. * @param receiveMode The receive mode, defaulted to peekLock. @@ -107,6 +120,9 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus subscription in receiveAndDelete mode. * + * In receiveAndDelete mode, messages are automatically removed from Service Bus as they are + * received. + * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. * @param receiveMode The receive mode, defaulted to receiveAndDelete. @@ -154,6 +170,11 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus queue in peekLock mode. * + * In peekLock mode, the receiver has a lock on the message for the duration specified on the + * queue or subscription. + * + * If the message is not settled during this time it becomes available to other receivers. + * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to peekLock. * @param options Options for the receiver itself. @@ -166,6 +187,9 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus queue in receiveAndDelete mode. * + * In receiveAndDelete mode, messages are automatically removed from Service Bus as they are + * received. + * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to receiveAndDelete. * @param options Options for the receiver itself. @@ -178,6 +202,11 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus subscription in peekLock mode. * + * In peekLock mode, the receiver has a lock on the message for the duration specified on the + * queue or subscription. + * + * If the message is not settled during this time it becomes available to other receivers. + * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. * @param receiveMode The receive mode, defaulted to peekLock. @@ -192,6 +221,9 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus subscription in receiveAndDelete mode. * + * In receiveAndDelete mode, messages are automatically removed from Service Bus as they are + * received. + * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. * @param receiveMode The receive mode, defaulted to receiveAndDelete. @@ -273,6 +305,11 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus queue's dead letter queue in peekLock mode. * + * In peekLock mode, the receiver has a lock on the message for the duration specified on the + * queue or subscription. + * + * If the message is not settled during this time it becomes available to other receivers. + * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode. */ @@ -283,6 +320,9 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus queue's dead letter queue in receiveAndDelete mode. * + * In receiveAndDelete mode, messages are automatically removed from Service Bus as they are + * received. + * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode. */ @@ -293,6 +333,11 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus subscription's dead letter queue in peekLock mode. * + * In peekLock mode, the receiver has a lock on the message for the duration specified on the + * queue or subscription. + * + * If the message is not settled during this time it becomes available to other receivers. + * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. * @param receiveMode The receive mode. @@ -305,6 +350,9 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus subscription's dead letter queue in receiveAndDelete mode. * + * In receiveAndDelete mode, messages are automatically removed from Service Bus as they are + * received. + * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. * @param receiveMode The receive mode. From c4b0dc430ecabba0015c392d5b741e9120b37940 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Thu, 7 May 2020 14:56:37 -0700 Subject: [PATCH 03/11] Meant to propagate the receiveMode to the deadLetterReceivers as well. --- sdk/servicebus/service-bus/src/serviceBusClient.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/servicebus/service-bus/src/serviceBusClient.ts b/sdk/servicebus/service-bus/src/serviceBusClient.ts index d1fe05f0152b..e480e9f4c922 100644 --- a/sdk/servicebus/service-bus/src/serviceBusClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusClient.ts @@ -311,7 +311,7 @@ export class ServiceBusClient { * If the message is not settled during this time it becomes available to other receivers. * * @param queueName The name of the queue to receive from. - * @param receiveMode The receive mode. + * @param receiveMode The receive mode, defaulted to peekLock. */ createDeadLetterReceiver( queueName: string, @@ -324,7 +324,7 @@ export class ServiceBusClient { * received. * * @param queueName The name of the queue to receive from. - * @param receiveMode The receive mode. + * @param receiveMode The receive mode, defaulted to receiveAndDelete. */ createDeadLetterReceiver( queueName: string, @@ -340,7 +340,7 @@ export class ServiceBusClient { * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. - * @param receiveMode The receive mode. + * @param receiveMode The receive mode, defaulted to peekLock. */ createDeadLetterReceiver( topicName: string, @@ -355,7 +355,7 @@ export class ServiceBusClient { * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. - * @param receiveMode The receive mode. + * @param receiveMode The receive mode, defaulted to receiveAndDelete. */ createDeadLetterReceiver( topicName: string, From 6e5ad835231da06ad5239070c2707b16b489edf1 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Thu, 7 May 2020 15:17:37 -0700 Subject: [PATCH 04/11] Updated with similar text to Ramya's suggestion --- .../service-bus/src/serviceBusClient.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sdk/servicebus/service-bus/src/serviceBusClient.ts b/sdk/servicebus/service-bus/src/serviceBusClient.ts index e480e9f4c922..72244a298051 100644 --- a/sdk/servicebus/service-bus/src/serviceBusClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusClient.ts @@ -86,6 +86,9 @@ export class ServiceBusClient { * * If the message is not settled during this time it becomes available to other receivers. * + * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on + * the message. + * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to peekLock. */ @@ -108,6 +111,9 @@ export class ServiceBusClient { * * If the message is not settled during this time it becomes available to other receivers. * + * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on + * the message. + * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. * @param receiveMode The receive mode, defaulted to peekLock. @@ -175,6 +181,9 @@ export class ServiceBusClient { * * If the message is not settled during this time it becomes available to other receivers. * + * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on + * the message. + * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to peekLock. * @param options Options for the receiver itself. @@ -207,6 +216,9 @@ export class ServiceBusClient { * * If the message is not settled during this time it becomes available to other receivers. * + * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on + * the message. + * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. * @param receiveMode The receive mode, defaulted to peekLock. @@ -310,6 +322,9 @@ export class ServiceBusClient { * * If the message is not settled during this time it becomes available to other receivers. * + * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on + * the message. + * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to peekLock. */ @@ -338,6 +353,9 @@ export class ServiceBusClient { * * If the message is not settled during this time it becomes available to other receivers. * + * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on + * the message. + * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. * @param receiveMode The receive mode, defaulted to peekLock. From 909b9fcea9c59871745fd1d959e78e6214082acd Mon Sep 17 00:00:00 2001 From: Richard Park Date: Thu, 7 May 2020 15:45:33 -0700 Subject: [PATCH 05/11] Let's try this one out. --- .../service-bus/src/serviceBusClient.ts | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sdk/servicebus/service-bus/src/serviceBusClient.ts b/sdk/servicebus/service-bus/src/serviceBusClient.ts index 72244a298051..abaea145ea81 100644 --- a/sdk/servicebus/service-bus/src/serviceBusClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusClient.ts @@ -84,7 +84,8 @@ export class ServiceBusClient { * In peekLock mode, the receiver has a lock on the message for the duration specified on the * queue or subscription. * - * If the message is not settled during this time it becomes available to other receivers. + * Messages that are not settled will be redelivered as many times as the max delivery count + * set on the queue or subscription. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -96,8 +97,7 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus queue in receiveAndDelete mode. * - * In receiveAndDelete mode, messages are automatically removed from Service Bus as they are - * received. + * In receiveAndDelete mode, messages are deleted from Service Bus as they are received. * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to receiveAndDelete. @@ -109,7 +109,8 @@ export class ServiceBusClient { * In peekLock mode, the receiver has a lock on the message for the duration specified on the * queue or subscription. * - * If the message is not settled during this time it becomes available to other receivers. + * Messages that are not settled will be redelivered as many times as the max delivery count + * set on the queue or subscription. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -126,8 +127,7 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus subscription in receiveAndDelete mode. * - * In receiveAndDelete mode, messages are automatically removed from Service Bus as they are - * received. + * In receiveAndDelete mode, messages are deleted from Service Bus as they are received. * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. @@ -179,7 +179,8 @@ export class ServiceBusClient { * In peekLock mode, the receiver has a lock on the message for the duration specified on the * queue or subscription. * - * If the message is not settled during this time it becomes available to other receivers. + * Messages that are not settled will be redelivered as many times as the max delivery count + * set on the queue or subscription. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -196,8 +197,7 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus queue in receiveAndDelete mode. * - * In receiveAndDelete mode, messages are automatically removed from Service Bus as they are - * received. + * In receiveAndDelete mode, messages are deleted from Service Bus as they are received. * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to receiveAndDelete. @@ -214,7 +214,8 @@ export class ServiceBusClient { * In peekLock mode, the receiver has a lock on the message for the duration specified on the * queue or subscription. * - * If the message is not settled during this time it becomes available to other receivers. + * Messages that are not settled will be redelivered as many times as the max delivery count + * set on the queue or subscription. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -233,8 +234,7 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus subscription in receiveAndDelete mode. * - * In receiveAndDelete mode, messages are automatically removed from Service Bus as they are - * received. + * In receiveAndDelete mode, messages are deleted from Service Bus as they are received. * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. @@ -320,7 +320,8 @@ export class ServiceBusClient { * In peekLock mode, the receiver has a lock on the message for the duration specified on the * queue or subscription. * - * If the message is not settled during this time it becomes available to other receivers. + * Messages that are not settled will be redelivered as many times as the max delivery count + * set on the queue or subscription. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -335,8 +336,7 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus queue's dead letter queue in receiveAndDelete mode. * - * In receiveAndDelete mode, messages are automatically removed from Service Bus as they are - * received. + * In receiveAndDelete mode, messages are deleted from Service Bus as they are received. * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to receiveAndDelete. @@ -351,7 +351,8 @@ export class ServiceBusClient { * In peekLock mode, the receiver has a lock on the message for the duration specified on the * queue or subscription. * - * If the message is not settled during this time it becomes available to other receivers. + * Messages that are not settled will be redelivered as many times as the max delivery count + * set on the queue or subscription. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -368,8 +369,7 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus subscription's dead letter queue in receiveAndDelete mode. * - * In receiveAndDelete mode, messages are automatically removed from Service Bus as they are - * received. + * In receiveAndDelete mode, messages are deleted from Service Bus as they are received. * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. From 3427842476094c3e5c671ebf5058e8c433cc2c6a Mon Sep 17 00:00:00 2001 From: Richard Park Date: Thu, 7 May 2020 15:49:46 -0700 Subject: [PATCH 06/11] We've got those entity specific names! --- .../service-bus/src/serviceBusClient.ts | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sdk/servicebus/service-bus/src/serviceBusClient.ts b/sdk/servicebus/service-bus/src/serviceBusClient.ts index abaea145ea81..a4a7cf616d0c 100644 --- a/sdk/servicebus/service-bus/src/serviceBusClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusClient.ts @@ -82,10 +82,10 @@ export class ServiceBusClient { * Creates a receiver for an Azure Service Bus queue in peekLock mode. * * In peekLock mode, the receiver has a lock on the message for the duration specified on the - * queue or subscription. + * queue. * * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the queue or subscription. + * set on the queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -107,10 +107,10 @@ export class ServiceBusClient { * Creates a receiver for an Azure Service Bus subscription in peekLock mode. * * In peekLock mode, the receiver has a lock on the message for the duration specified on the - * queue or subscription. + * subscription. * * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the queue or subscription. + * set on the subscription. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -177,10 +177,10 @@ export class ServiceBusClient { * Creates a receiver for an Azure Service Bus queue in peekLock mode. * * In peekLock mode, the receiver has a lock on the message for the duration specified on the - * queue or subscription. + * queue. * * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the queue or subscription. + * set on the queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -212,10 +212,10 @@ export class ServiceBusClient { * Creates a receiver for an Azure Service Bus subscription in peekLock mode. * * In peekLock mode, the receiver has a lock on the message for the duration specified on the - * queue or subscription. + * subscription. * * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the queue or subscription. + * set on the subscription. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -318,10 +318,10 @@ export class ServiceBusClient { * Creates a receiver for an Azure Service Bus queue's dead letter queue in peekLock mode. * * In peekLock mode, the receiver has a lock on the message for the duration specified on the - * queue or subscription. + * queue. * * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the queue or subscription. + * set on the queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -349,10 +349,10 @@ export class ServiceBusClient { * Creates a receiver for an Azure Service Bus subscription's dead letter queue in peekLock mode. * * In peekLock mode, the receiver has a lock on the message for the duration specified on the - * queue or subscription. + * subscription. * * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the queue or subscription. + * set on the subscription. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. From 7236754d897adc0227c016428bd1d617e36ca685 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Thu, 7 May 2020 15:57:17 -0700 Subject: [PATCH 07/11] Updated with Ramya's addition to mention the dead letter queue and improve cross-advertising of features. :) --- sdk/servicebus/service-bus/src/serviceBusClient.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/servicebus/service-bus/src/serviceBusClient.ts b/sdk/servicebus/service-bus/src/serviceBusClient.ts index a4a7cf616d0c..10e4751b30c3 100644 --- a/sdk/servicebus/service-bus/src/serviceBusClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusClient.ts @@ -85,7 +85,7 @@ export class ServiceBusClient { * queue. * * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the queue. + * set on the queue, after which they get sent to a separate dead letter queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -110,7 +110,7 @@ export class ServiceBusClient { * subscription. * * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the subscription. + * set on the subscription, after which they get sent to a separate dead letter queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -180,7 +180,7 @@ export class ServiceBusClient { * queue. * * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the queue. + * set on the queue, after which they get sent to a separate dead letter queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -215,7 +215,7 @@ export class ServiceBusClient { * subscription. * * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the subscription. + * set on the subscription, after which they get sent to a separate dead letter queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -321,7 +321,7 @@ export class ServiceBusClient { * queue. * * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the queue. + * set on the queue, after which they get sent to a separate dead letter queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -352,7 +352,7 @@ export class ServiceBusClient { * subscription. * * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the subscription. + * set on the subscription, after which they get sent to a separate dead letter queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. From e9fffc573f33c50691a8f662d34a49a5d6f0c49d Mon Sep 17 00:00:00 2001 From: Richard Park Date: Fri, 8 May 2020 16:40:16 -0700 Subject: [PATCH 08/11] Improve the docs a bit more with feedback from Ramya. Also corrected an inaccuracy on the dead letter documentaion. You can't dead letter a dead lettered message! --- .../service-bus/src/serviceBusClient.ts | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/sdk/servicebus/service-bus/src/serviceBusClient.ts b/sdk/servicebus/service-bus/src/serviceBusClient.ts index 10e4751b30c3..7951b0965a15 100644 --- a/sdk/servicebus/service-bus/src/serviceBusClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusClient.ts @@ -84,8 +84,9 @@ export class ServiceBusClient { * In peekLock mode, the receiver has a lock on the message for the duration specified on the * queue. * - * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the queue, after which they get sent to a separate dead letter queue. + * Messages that are not settled within the lock duration will be redelivered as many times as + * the max delivery count set on the queue, after which they get sent to a separate dead letter + * queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -109,8 +110,9 @@ export class ServiceBusClient { * In peekLock mode, the receiver has a lock on the message for the duration specified on the * subscription. * - * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the subscription, after which they get sent to a separate dead letter queue. + * Messages that are not settled within the lock duration will be redelivered as many times as + * the max delivery count set on the subscription, after which they get sent to a separate dead letter + * queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -176,11 +178,12 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus queue in peekLock mode. * - * In peekLock mode, the receiver has a lock on the message for the duration specified on the + * In peekLock mode, the receiver has a lock on the session for the duration specified on the * queue. * - * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the queue, after which they get sent to a separate dead letter queue. + * Messages that are not settled within the lock duration will be redelivered as many times as + * the max delivery count set on the queue, after which they get sent to a separate dead letter + * queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -211,11 +214,12 @@ export class ServiceBusClient { /** * Creates a receiver for an Azure Service Bus subscription in peekLock mode. * - * In peekLock mode, the receiver has a lock on the message for the duration specified on the + * In peekLock mode, the receiver has a lock on the session for the duration specified on the * subscription. * - * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the subscription, after which they get sent to a separate dead letter queue. + * Messages that are not settled within the lock duration will be redelivered as many times as + * the max delivery count set on the subscription, after which they get sent to a separate dead letter + * queue. * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. @@ -320,10 +324,10 @@ export class ServiceBusClient { * In peekLock mode, the receiver has a lock on the message for the duration specified on the * queue. * - * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the queue, after which they get sent to a separate dead letter queue. + * In peekLock mode, the receiver has a lock on the message for the duration specified on the + * queue. Messages that are not settled within the lock duration will be redelivered. * - * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on + * You can settle a message by calling complete(), abandon() or defer() methods on * the message. * * @param queueName The name of the queue to receive from. @@ -349,12 +353,9 @@ export class ServiceBusClient { * Creates a receiver for an Azure Service Bus subscription's dead letter queue in peekLock mode. * * In peekLock mode, the receiver has a lock on the message for the duration specified on the - * subscription. + * subscription. Messages that are not settled within the lock duration will be redelivered. * - * Messages that are not settled will be redelivered as many times as the max delivery count - * set on the subscription, after which they get sent to a separate dead letter queue. - * - * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on + * You can settle a message by calling complete(), abandon() or defer() methods on * the message. * * @param topicName Name of the topic for the subscription we want to receive from. From 832f774b8dd153cac6f4a35dd2f6480ee4327d0d Mon Sep 17 00:00:00 2001 From: Richard Park Date: Fri, 8 May 2020 17:56:22 -0700 Subject: [PATCH 09/11] Add in the session enabled bit of documentation. --- sdk/servicebus/service-bus/src/serviceBusClient.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/servicebus/service-bus/src/serviceBusClient.ts b/sdk/servicebus/service-bus/src/serviceBusClient.ts index 7951b0965a15..a97330430328 100644 --- a/sdk/servicebus/service-bus/src/serviceBusClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusClient.ts @@ -176,7 +176,7 @@ export class ServiceBusClient { } /** - * Creates a receiver for an Azure Service Bus queue in peekLock mode. + * Creates a receiver for a session enabled Azure Service Bus queue in peekLock mode. * * In peekLock mode, the receiver has a lock on the session for the duration specified on the * queue. @@ -198,7 +198,7 @@ export class ServiceBusClient { options?: CreateSessionReceiverOptions ): Promise>; /** - * Creates a receiver for an Azure Service Bus queue in receiveAndDelete mode. + * Creates a receiver for a session enabled Azure Service Bus queue in receiveAndDelete mode. * * In receiveAndDelete mode, messages are deleted from Service Bus as they are received. * @@ -212,7 +212,7 @@ export class ServiceBusClient { options?: CreateSessionReceiverOptions ): Promise>; /** - * Creates a receiver for an Azure Service Bus subscription in peekLock mode. + * Creates a receiver for a session enabled Azure Service Bus subscription in peekLock mode. * * In peekLock mode, the receiver has a lock on the session for the duration specified on the * subscription. @@ -236,7 +236,7 @@ export class ServiceBusClient { options?: CreateSessionReceiverOptions ): Promise>; /** - * Creates a receiver for an Azure Service Bus subscription in receiveAndDelete mode. + * Creates a receiver for a session enabled Azure Service Bus subscription in receiveAndDelete mode. * * In receiveAndDelete mode, messages are deleted from Service Bus as they are received. * From 37bab1c44ccd97e538bad9a28f0f2b05cbc3113f Mon Sep 17 00:00:00 2001 From: Richard Park Date: Fri, 8 May 2020 18:04:17 -0700 Subject: [PATCH 10/11] Updated to include link to dead letter queues --- sdk/servicebus/service-bus/src/serviceBusClient.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sdk/servicebus/service-bus/src/serviceBusClient.ts b/sdk/servicebus/service-bus/src/serviceBusClient.ts index a97330430328..3cf31a035896 100644 --- a/sdk/servicebus/service-bus/src/serviceBusClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusClient.ts @@ -330,6 +330,9 @@ export class ServiceBusClient { * You can settle a message by calling complete(), abandon() or defer() methods on * the message. * + * See here for more information about dead letter queues: + * https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dead-letter-queues + * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to peekLock. */ @@ -342,6 +345,9 @@ export class ServiceBusClient { * * In receiveAndDelete mode, messages are deleted from Service Bus as they are received. * + * See here for more information about dead letter queues: + * https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dead-letter-queues + * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to receiveAndDelete. */ @@ -358,6 +364,9 @@ export class ServiceBusClient { * You can settle a message by calling complete(), abandon() or defer() methods on * the message. * + * See here for more information about dead letter queues: + * https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dead-letter-queues + * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. * @param receiveMode The receive mode, defaulted to peekLock. @@ -372,6 +381,9 @@ export class ServiceBusClient { * * In receiveAndDelete mode, messages are deleted from Service Bus as they are received. * + * See here for more information about dead letter queues: + * https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dead-letter-queues + * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. * @param receiveMode The receive mode, defaulted to receiveAndDelete. From 94fd9604be1c492f657fce2fa1f913bf75c1c08f Mon Sep 17 00:00:00 2001 From: Richard Park Date: Mon, 11 May 2020 11:40:09 -0700 Subject: [PATCH 11/11] Updated with links to how peekLock mode works in the service bus documentation. --- .../service-bus/src/serviceBusClient.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sdk/servicebus/service-bus/src/serviceBusClient.ts b/sdk/servicebus/service-bus/src/serviceBusClient.ts index 3cf31a035896..c0cc55577610 100644 --- a/sdk/servicebus/service-bus/src/serviceBusClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusClient.ts @@ -90,6 +90,9 @@ export class ServiceBusClient { * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. + * + * More information about how peekLock and message settlement works here: + * https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to peekLock. @@ -116,6 +119,9 @@ export class ServiceBusClient { * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. + * + * More information about how peekLock and message settlement works here: + * https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. @@ -187,6 +193,9 @@ export class ServiceBusClient { * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. + * + * More information about how peekLock and message settlement works here: + * https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to peekLock. @@ -223,6 +232,9 @@ export class ServiceBusClient { * * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on * the message. + * + * More information about how peekLock and message settlement works here: + * https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from. @@ -332,6 +344,9 @@ export class ServiceBusClient { * * See here for more information about dead letter queues: * https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dead-letter-queues + * + * More information about how peekLock and message settlement works here: + * https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock * * @param queueName The name of the queue to receive from. * @param receiveMode The receive mode, defaulted to peekLock. @@ -366,6 +381,9 @@ export class ServiceBusClient { * * See here for more information about dead letter queues: * https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dead-letter-queues + * + * More information about how peekLock and message settlement works here: + * https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock * * @param topicName Name of the topic for the subscription we want to receive from. * @param subscriptionName Name of the subscription (under the `topic`) that we want to receive from.