Skip to content

Commit

Permalink
Incorporating sample feedback for the merged pr #29702 (#29704)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuchandy authored Jun 30, 2022
1 parent 04ac4f9 commit d3370da
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Guidelines](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.m
[SendMessageWithAzureIdentityAsyncSample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/SendMessageWithAzureIdentityAsyncSample.java
[SendScheduledMessageAndCancelAsyncSample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/SendScheduledMessageAndCancelAsyncSample.java
[ServiceBusProcessorSample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusProcessorSample.java
[ServiceBusReceiverAsyncClientRetrySample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientRetrySample.java
[ServiceBusSessionProcessorSample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusSessionProcessorSample.java
[AdministrationClientUpdateQueueSample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/AdministrationClientUpdateQueueSample.java
[ReceiveMessageAsyncUsingSasSample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ReceiveMessageUsingSasSample.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
import java.util.function.Function;

/**
* The sample demonstrates how handle terminal error from {@link ServiceBusReceiverAsyncClient} (aka LowLevelClient)
* and recreate the LowLevelClient to continue receive.
*
* The sample demonstrates how handle terminal error from {@link ServiceBusReceiverAsyncClient#receiveMessages()}
* and recreate the client to continue receiving messages.
*
* <p>
* The {@link ServiceBusReceiverAsyncClient} emits a terminal error (hence no longer emit messages) in
* the following cases -
* The {@link ServiceBusReceiverAsyncClient#receiveMessages()} emits a terminal error (hence no longer emit messages)
* in the following cases -
*
* <ul>
* <li>When the connection encounters a non-retriable error. A few examples of non-retriable errors are - the app
Expand All @@ -39,7 +39,7 @@
*
* <p>
* When these cases happen, the usual pattern is to log the terminal error for auditing and create a new client
* to receive messages.
* to continue receiving messages.
*/
public class ServiceBusReceiverAsyncClientRetrySample {
private static final ClientLogger LOGGER = new ClientLogger(ServiceBusReceiverAsyncClientRetrySample.class);
Expand All @@ -48,8 +48,8 @@ public class ServiceBusReceiverAsyncClientRetrySample {
String queueName = System.getenv("AZURE_SERVICEBUS_SAMPLE_QUEUE_NAME");

/**
* Main method to show how to handle terminal error from ServiceBusReceiverAsyncClient to
* continue receive from Service Bus queue.
* Main method of the sample showing how to handle terminal error from
* {@link ServiceBusReceiverAsyncClient#receiveMessages()} and recreate the client to continue receiving messages.
*
* @param args Unused arguments to the program.
*
Expand All @@ -61,8 +61,8 @@ public static void main(String[] args) throws InterruptedException {
}

/**
* Run method to invoke this demo on how to handle terminal error from ServiceBusReceiverAsyncClient to
* continue receive from Service Bus queue.
* Run method to invoke this demo on how to handle terminal error from
* {@link ServiceBusReceiverAsyncClient#receiveMessages()} and recreate the client to continue receiving messages.
*/
@Test
public void run() throws InterruptedException {
Expand Down

0 comments on commit d3370da

Please sign in to comment.