Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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