Update docs metadata
This commit is contained in:
Родитель
579c491385
Коммит
6d3220f8c6
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
title: Azure Service Bus client library for Java
|
||||
keywords: Azure, java, SDK, API, azure-messaging-servicebus, service-bus-messaging
|
||||
ms.date: 02/16/2024
|
||||
ms.date: 04/23/2024
|
||||
ms.topic: reference
|
||||
ms.devlang: java
|
||||
ms.service: service-bus-messaging
|
||||
---
|
||||
# Azure Service Bus client library for Java - version 7.15.1
|
||||
# Azure Service Bus client library for Java - version 7.16.0
|
||||
|
||||
|
||||
Microsoft Azure Service Bus is a fully managed enterprise integration message broker. Service Bus can decouple
|
||||
|
@ -43,7 +43,7 @@ To quickly create the needed Service Bus resources in Azure and to receive a con
|
|||
#### Include the BOM file
|
||||
|
||||
Please include the azure-sdk-bom to your project to take dependency on the General Availability (GA) version of the library. In the following snippet, replace the {bom_version_to_target} placeholder with the version number.
|
||||
To learn more about the BOM, see the [AZURE SDK BOM README](https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/boms/azure-sdk-bom/README.md).
|
||||
To learn more about the BOM, see the [AZURE SDK BOM README](https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/boms/azure-sdk-bom/README.md).
|
||||
|
||||
```xml
|
||||
<dependencyManagement>
|
||||
|
@ -78,7 +78,7 @@ add the direct dependency to your project as follows.
|
|||
<dependency>
|
||||
<groupId>com.azure</groupId>
|
||||
<artifactId>azure-messaging-servicebus</artifactId>
|
||||
<version>7.15.1</version>
|
||||
<version>7.16.0</version>
|
||||
</dependency>
|
||||
```
|
||||
[//]: # ({x-version-update-end})
|
||||
|
@ -98,7 +98,7 @@ First, add the package:
|
|||
<dependency>
|
||||
<groupId>com.azure</groupId>
|
||||
<artifactId>azure-identity</artifactId>
|
||||
<version>1.11.2</version>
|
||||
<version>1.11.4</version>
|
||||
</dependency>
|
||||
```
|
||||
[//]: # ({x-version-update-end})
|
||||
|
@ -408,9 +408,24 @@ ServiceBusReceiverClient receiver = new ServiceBusClientBuilder()
|
|||
receiver.close();
|
||||
```
|
||||
|
||||
### When to use 'ServiceBusProcessorClient'.
|
||||
|
||||
When to use 'ServiceBusProcessorClient', 'ServiceBusReceiverClient' or ServiceBusReceiverAsyncClient?
|
||||
|
||||
The best option for receiving messages in most common cases is 'ServiceBusProcessorClient'. The processor can handle errors automatically and is designed to receive messages continuously. The processor has a simple API to set concurrency for processing messages in parallel.
|
||||
|
||||
The low-level client, 'ServiceBusReceiverAsyncClient', is for advanced users who want more control and flexibility over their Reactive application at the expense of more complexity in the application. Unlike the processor, the low-level 'ServiceBusReceiverAsyncClient' does not have automatic recovery built into it. The reactive application using this client needs to deal with terminal events and choose the operators (to add recovery, manage backpressure, threading) in the Reactor chain. As stated earlier, for common asynchronous receive situations, the 'ServiceBusProcessorClient' should be the first choice.
|
||||
|
||||
'ServiceBusReceiverClient' usage is discouraged unless you want to have pull semantics or want to migrate existing code base that uses synchronous receiver approach. For high-throughput and parallel message processing use cases, use 'ServiceBusProcessorClient'.
|
||||
|
||||
### Sharing of connection between clients
|
||||
The creation of physical connection to Service Bus requires resources. An application should share the connection
|
||||
between clients which can be achieved by sharing the top level builder as shown below.
|
||||
|
||||
All the clients created from a shared `ServiceBusClientBuilder` instance will share the same connection to the Service Bus namespace.
|
||||
|
||||
|
||||
While using shared connection allows multiplexing operations among clients on one connection, sharing can also become a bottleneck if there are many clients, or the clients together generate high load. Each connection has one IO-Thread associated with it. The clients put their work on this shared IO-Thread's work-queue and the progress of each client depends on the timely completion of its work. The IO-Thread handles the enqueued work serially, which means, if the IO-Thread work-queue ends up with a lot of pending work to deal with, then it can be manifested as clients stalling, that leads to timeout, lost lock or slowdown in recovery path. Hence, if the application load to a Service Bus endpoint is reasonably high (in terms of overall number of sent-received messages or payload size), use a separate builder instance for each client you build. For example, for each entity (queue or topic and subscription), you can create a new `ServiceBusClientBuilder` and a build a client from it. In case of extremely high load to a specific entity, you might want to either create multiple client instances for that entity or run clients in multiple hosts (e.g., containers, VM) to load balance.
|
||||
|
||||
In the following example, a sender and receiver clients are built from a shared top-level builder, which means they use the same connection.
|
||||
|
||||
```java com.azure.messaging.servicebus.connection.sharing
|
||||
TokenCredential credential = new DefaultAzureCredentialBuilder().build();
|
||||
|
@ -442,15 +457,6 @@ try {
|
|||
receiver.close();
|
||||
}
|
||||
```
|
||||
### When to use 'ServiceBusProcessorClient'.
|
||||
When to use 'ServiceBusProcessorClient', 'ServiceBusReceiverClient' or ServiceBusReceiverAsyncClient? The processor
|
||||
is built using 'ServiceBusReceiverAsyncClient', it provides a convenient way of receiving messages with default
|
||||
auto complete and auto-renew of message locks in 'PEEK_LOCK' mode. The processor is appropriate where the
|
||||
applications have not made complete move to async receiver client and want to process message in synchronous mode.
|
||||
The processor receives messages forever because it recovers from the network errors internally.
|
||||
'ServiceBusProcessorClient:processMessage()' function call is made for each message. Alternatively, You can also use
|
||||
'ServiceBusReceiverClient', it is a lower level client and provides a wider range of APIs. If async processing is
|
||||
suitable for your application, you can use 'ServiceBusReceiverAsyncClient'.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
@ -515,13 +521,13 @@ the following set of sample is available [here][samples_readme].
|
|||
## Contributing
|
||||
|
||||
If you would like to become an active contributor to this project please refer to our [Contribution
|
||||
Guidelines](https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/CONTRIBUTING.md) for more information.
|
||||
Guidelines](https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/CONTRIBUTING.md) for more information.
|
||||
|
||||
<!-- Links -->
|
||||
[aad_authorization]: /azure/service-bus-messaging/authenticate-application
|
||||
[amqp_transport_error]: https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-amqp-error
|
||||
[AmqpErrorCondition]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpErrorCondition.java
|
||||
[AmqpRetryOptions]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpRetryOptions.java
|
||||
[AmqpErrorCondition]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpErrorCondition.java
|
||||
[AmqpRetryOptions]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpRetryOptions.java
|
||||
[api_documentation]: https://aka.ms/java-docs
|
||||
[dead-letter-queue]: /azure/service-bus-messaging/service-bus-dead-letter-queues
|
||||
[deadletterqueue_docs]: /azure/service-bus-messaging/service-bus-dead-letter-queues
|
||||
|
@ -536,27 +542,27 @@ Guidelines](https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-ser
|
|||
[product_docs]: /azure/service-bus-messaging
|
||||
[qpid_proton_j_apache]: https://qpid.apache.org/proton/
|
||||
[queue_concept]: /azure/service-bus-messaging/service-bus-messaging-overview#queues
|
||||
[ReceiveMode]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/models/ReceiveMode.java
|
||||
[RetryOptions]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpRetryOptions.java
|
||||
[sample_examples]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/
|
||||
[samples_readme]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus
|
||||
[ReceiveMode]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/models/ReceiveMode.java
|
||||
[RetryOptions]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpRetryOptions.java
|
||||
[sample_examples]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/
|
||||
[samples_readme]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus
|
||||
[service_bus_connection_string]: /azure/service-bus-messaging/service-bus-create-namespace-portal#get-the-connection-string
|
||||
[servicebus_create]: /azure/service-bus-messaging/service-bus-create-namespace-portal
|
||||
[servicebus_messaging_exceptions]: /azure/service-bus-messaging/service-bus-messaging-exceptions
|
||||
[servicebus_roles]: /azure/service-bus-messaging/authenticate-application#built-in-rbac-roles-for-azure-service-bus
|
||||
[ServiceBusClientBuilder]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusClientBuilder.java
|
||||
[ServiceBusMessage]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessage.java
|
||||
[ServiceBusReceiverAsyncClient]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java
|
||||
[ServiceBusReceiverClient]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java
|
||||
[ServiceBusSenderAsyncClient]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClient.java
|
||||
[ServiceBusSenderClient]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderClient.java
|
||||
[ServiceBusClientBuilder]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusClientBuilder.java
|
||||
[ServiceBusMessage]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusMessage.java
|
||||
[ServiceBusReceiverAsyncClient]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClient.java
|
||||
[ServiceBusReceiverClient]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusReceiverClient.java
|
||||
[ServiceBusSenderAsyncClient]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClient.java
|
||||
[ServiceBusSenderClient]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderClient.java
|
||||
[service_bus_create]: /azure/service-bus-messaging/service-bus-create-namespace-portal
|
||||
[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/servicebus/azure-messaging-servicebus/
|
||||
[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/servicebus/azure-messaging-servicebus/
|
||||
[subscription_concept]: /azure/service-bus-messaging/service-bus-queues-topics-subscriptions#topics-and-subscriptions
|
||||
[topic_concept]: /azure/service-bus-messaging/service-bus-messaging-overview#topics
|
||||
[wiki_identity]: https://github.com/Azure/azure-sdk-for-java/wiki/Identity-and-Authentication
|
||||
[known-issue-binarydata-notfound]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/servicebus/azure-messaging-servicebus/known-issues.md#can-not-resolve-binarydata-or-noclassdeffounderror-version-700
|
||||
[sync_receivemessages_implicit_prefetch]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.15.1/sdk/servicebus/azure-messaging-servicebus/docs/SyncReceiveAndPrefetch.md
|
||||
[known-issue-binarydata-notfound]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/servicebus/azure-messaging-servicebus/known-issues.md#can-not-resolve-binarydata-or-noclassdeffounderror-version-700
|
||||
[sync_receivemessages_implicit_prefetch]: https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-servicebus_7.16.0/sdk/servicebus/azure-messaging-servicebus/docs/SyncReceiveAndPrefetch.md
|
||||
[peek_lock_mode_docs]: https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
|
||||
[receive_and_delete_mode_docs]: https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#receiveanddelete
|
||||
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fservicebus%2Fazure-messaging-servicebus%2FREADME.png)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"Name": "azure-messaging-servicebus",
|
||||
"Version": "7.15.1",
|
||||
"Version": "7.16.0",
|
||||
"DevVersion": null,
|
||||
"DirectoryPath": "sdk/servicebus/azure-messaging-servicebus",
|
||||
"ServiceDirectory": "servicebus",
|
||||
|
@ -10,7 +10,7 @@
|
|||
"SdkType": "client",
|
||||
"IsNewSdk": true,
|
||||
"ArtifactName": "azure-messaging-servicebus",
|
||||
"ReleaseStatus": "2024-02-16",
|
||||
"ReleaseStatus": "2024-04-22",
|
||||
"Namespaces": [
|
||||
"com.azure.messaging.servicebus",
|
||||
"com.azure.messaging.servicebus.administration",
|
||||
|
|
Загрузка…
Ссылка в новой задаче