@azure/service-bus 1.1.5 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/README.md +12 -4
- package/browser/service-bus.js +590 -423
- package/browser/service-bus.js.map +1 -1
- package/dist/index.js +517 -381
- package/dist/index.js.map +1 -1
- package/dist-esm/src/clientEntityContext.js +13 -20
- package/dist-esm/src/clientEntityContext.js.map +1 -1
- package/dist-esm/src/connectionContext.js +82 -5
- package/dist-esm/src/connectionContext.js.map +1 -1
- package/dist-esm/src/core/batchingReceiver.js +69 -48
- package/dist-esm/src/core/batchingReceiver.js.map +1 -1
- package/dist-esm/src/core/linkEntity.js +8 -0
- package/dist-esm/src/core/linkEntity.js.map +1 -1
- package/dist-esm/src/core/managementClient.js +19 -17
- package/dist-esm/src/core/managementClient.js.map +1 -1
- package/dist-esm/src/core/messageReceiver.js +92 -63
- package/dist-esm/src/core/messageReceiver.js.map +1 -1
- package/dist-esm/src/core/messageSender.js +157 -157
- package/dist-esm/src/core/messageSender.js.map +1 -1
- package/dist-esm/src/sender.js +14 -1
- package/dist-esm/src/sender.js.map +1 -1
- package/dist-esm/src/serviceBusAtomManagementClient.js +1 -1
- package/dist-esm/src/serviceBusClient.js +4 -1
- package/dist-esm/src/serviceBusClient.js.map +1 -1
- package/dist-esm/src/serviceBusMessage.js +43 -68
- package/dist-esm/src/serviceBusMessage.js.map +1 -1
- package/dist-esm/src/session/messageSession.js +5 -1
- package/dist-esm/src/session/messageSession.js.map +1 -1
- package/dist-esm/src/util/constants.js +1 -1
- package/dist-esm/src/util/utils.js +12 -0
- package/dist-esm/src/util/utils.js.map +1 -1
- package/package.json +19 -9
- package/src/clientEntityContext.ts +46 -45
- package/src/connectionContext.ts +147 -6
- package/src/core/batchingReceiver.ts +96 -49
- package/src/core/linkEntity.ts +8 -0
- package/src/core/managementClient.ts +81 -19
- package/src/core/messageReceiver.ts +116 -87
- package/src/core/messageSender.ts +223 -222
- package/src/sender.ts +13 -1
- package/src/serviceBusAtomManagementClient.ts +1 -1
- package/src/serviceBusClient.ts +11 -13
- package/src/serviceBusMessage.ts +55 -97
- package/src/session/messageSession.ts +12 -9
- package/src/util/constants.ts +1 -1
- package/src/util/utils.ts +11 -0
- package/tsconfig.json +2 -7
- package/types/3.1/service-bus.d.ts +1615 -0
- package/{typings → types/latest}/service-bus.d.ts +24 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
## 1.1.9 (2020-08-19)
|
|
4
|
+
|
|
5
|
+
- Fixes [bug 10641](https://github.com/Azure/azure-sdk-for-js/issues/10641) where parallel requests
|
|
6
|
+
on the management link would fail with a `ServiceUnavailableError`.
|
|
7
|
+
- Fixes [bug 9287](https://github.com/Azure/azure-sdk-for-js/issues/9287)
|
|
8
|
+
where operations that used the `RequestResponseLink` and encountered an error
|
|
9
|
+
would fail to cleanup their internal timer.
|
|
10
|
+
This caused exiting the process to be delayed until the timer reached its timeout.
|
|
11
|
+
|
|
12
|
+
## 1.1.8 (2020-07-15)
|
|
13
|
+
|
|
14
|
+
- Fixes [bug 9926](https://github.com/Azure/azure-sdk-for-js/issues/9926)
|
|
15
|
+
where attempting to create AMQP links when the AMQP connection was in the
|
|
16
|
+
process of closing resulted in a `TypeError` in an uncaught exception.
|
|
17
|
+
|
|
18
|
+
## 1.1.7 (2020-05-13)
|
|
19
|
+
|
|
20
|
+
- Relaxes the scheme check for the endpoint while parsing the connection string.
|
|
21
|
+
This allows "\<anything\>://" as the scheme as opposed to the "sb://" scheme suggested by the connection string in the portal.
|
|
22
|
+
Fixes [bug 7907](https://github.com/Azure/azure-sdk-for-js/issues/7907).
|
|
23
|
+
- Provides down-leveled type declaration files to support older TypeScript versions 3.1 to 3.6.
|
|
24
|
+
[PR 8515](https://github.com/Azure/azure-sdk-for-js/pull/8515)
|
|
25
|
+
- Updates `@azure/amqp-common` to version 1.0.0-preview.15, fixing an issue with 'OperationTimeoutError's not being considered retryable.
|
|
26
|
+
- Ensures the promise returned by `receiveMessages()` is rejected appropriately when the connection disconnects in the midst of
|
|
27
|
+
draining credits. This fixes [bug 7689](https://github.com/Azure/azure-sdk-for-js/issues/7689) with [PR 8552](https://github.com/Azure/azure-sdk-for-js/pull/8552)
|
|
28
|
+
- Fixes [bug 8673](https://github.com/Azure/azure-sdk-for-js/issues/8673) where a user application would crash with ECONNRESET error due to the underlying AMQP library
|
|
29
|
+
`rhea` not cleaning up sockets on connection going idle. Details can be found in [PR amqp/rhea#300](https://github.com/amqp/rhea/pull/300)
|
|
30
|
+
|
|
31
|
+
## 1.1.6 (2020-04-23)
|
|
32
|
+
|
|
33
|
+
- Removes the `@azure/ms-rest-nodeauth` dependency.
|
|
34
|
+
This allows users to use any version of `@azure/ms-rest-nodeauth` directly with `@azure/service-bus` without TypeScript compilation errors.
|
|
35
|
+
Fixes [bug 8041](https://github.com/Azure/azure-sdk-for-js/issues/8041).
|
|
36
|
+
- Fixes for the below bugs when settling a message with [PR 8406](https://github.com/Azure/azure-sdk-for-js/pull/8406)
|
|
37
|
+
- Not setting user provided deadletter error reason and description when deadlettering a deferred message.
|
|
38
|
+
- Not setting user provided custom properties when deadlettering a non deferred message.
|
|
39
|
+
- Not able to settle previously received messages when a receiver recovers from a broken link or connection. Please note that if using sessions, this behavior doesn't change with this release.
|
|
40
|
+
- Fixes an issue where non-retryable errors caused by a connection disconnecting were not getting surfaced to the user's registered error handler
|
|
41
|
+
when using the `registerMessageHandler` method on a receiver.
|
|
42
|
+
[PR 8401](https://github.com/Azure/azure-sdk-for-js/pull/8401)
|
|
43
|
+
- Fixes reconnection issues by creating a new connection object rather than re-using the existing one.
|
|
44
|
+
[PR 8447](https://github.com/Azure/azure-sdk-for-js/pull/8447)
|
|
45
|
+
- Adds a new method `open()` on the sender to allow you to front load the work of setting up the underlying AMQP links. Use this if you want to avoid having your first `send()` operation pay the tax of link set up.
|
|
46
|
+
[PR 8329](https://github.com/Azure/azure-sdk-for-js/pull/8329). This PR also fixes a bug where a sender recovering from connection loss does not report the error back to the user from ongoing send operations in expected time.
|
|
47
|
+
|
|
3
48
|
## 1.1.5 (2020-03-24)
|
|
4
49
|
|
|
5
50
|
- Removed interfaces related to unreleased management api features from the API surface that were accidentally exported in version 1.1.3
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Use the client library for Azure Service Bus in your Node.js application to
|
|
|
7
7
|
- Send messages to a Queue or Topic
|
|
8
8
|
- Receive messages from a Queue or Subscription
|
|
9
9
|
|
|
10
|
-
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/%40azure/service-bus_1.1.
|
|
10
|
+
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/%40azure/service-bus_1.1.9/sdk/servicebus/service-bus) | [Package (npm)](https://www.npmjs.com/package/@azure/service-bus) | [API Reference Documentation](https://docs.microsoft.com/en-us/javascript/api/%40azure/service-bus/) | [Product documentation](https://azure.microsoft.com/en-us/services/service-bus/) | [Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples-v1)
|
|
11
11
|
|
|
12
12
|
## Getting Started
|
|
13
13
|
|
|
@@ -41,11 +41,12 @@ this class using one of the 3 static methods on it
|
|
|
41
41
|
from the Azure portal.
|
|
42
42
|
- [createFromTokenProvider](https://docs.microsoft.com/en-us/javascript/api/%40azure/service-bus/servicebusclient#createfromtokenprovider-string--tokenprovider--servicebusclientoptions-)
|
|
43
43
|
- This method takes the host name of your Service Bus instance and your custom implementation of the [TokenProvider](https://github.com/Azure/amqp-common-js/blob/master/lib/auth/token.ts) interface.The host name is of the format `name-of-service-bus-instance.servicebus.windows.net`.
|
|
44
|
+
If you're using an own token provider against AAD, then set the "scopes" for service-bus to be `["https://servicebus.azure.net//user_impersonation"]` to get the appropriate token.
|
|
44
45
|
- [createFromAADTokenCredentials](https://docs.microsoft.com/en-us/javascript/api/%40azure/service-bus/servicebusclient#createfromaadtokencredentials-string--applicationtokencredentials---usertokencredentials---devicetokencredentials---msitokencredentials--servicebusclientoptions-)
|
|
45
46
|
- This method takes the host name of your Service Bus instance and a credentials object that you need
|
|
46
47
|
to generate using the [@azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth)
|
|
47
48
|
library. The host name is of the format `name-of-service-bus-instance.servicebus.windows.net`.
|
|
48
|
-
- Refer to the samples that use an [
|
|
49
|
+
- Refer to the samples that use an [interactive login](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/servicebus/service-bus/samples-v1/javascript/interactiveLogin.js) or [service principal](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/servicebus/service-bus/samples-v1/javascript/servicePrincipalLogin.js)
|
|
49
50
|
|
|
50
51
|
### Key concepts
|
|
51
52
|
|
|
@@ -88,6 +89,13 @@ You can also use the [sendBatch](https://docs.microsoft.com/en-us/javascript/api
|
|
|
88
89
|
```javascript
|
|
89
90
|
const queueClient = serviceBusClient.createQueueClient("my-queue");
|
|
90
91
|
const sender = queueClient.createSender();
|
|
92
|
+
|
|
93
|
+
// Optionally, you can await on `sender.open()` if you want to front load the work of setting
|
|
94
|
+
// up the AMQP link to the service. If not called, the `sender` will call `open()` on your behalf
|
|
95
|
+
// on the first send operation.
|
|
96
|
+
//
|
|
97
|
+
// await sender.open()
|
|
98
|
+
|
|
91
99
|
await sender.send({
|
|
92
100
|
body: "my-message-body"
|
|
93
101
|
});
|
|
@@ -239,12 +247,12 @@ export DEBUG=azure:service-bus:error,azure-amqp-common:error,rhea-promise:error,
|
|
|
239
247
|
|
|
240
248
|
## Next Steps
|
|
241
249
|
|
|
242
|
-
Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree
|
|
250
|
+
Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples-v1)
|
|
243
251
|
directory for detailed examples on how to use this library to send and receive messages to/from
|
|
244
252
|
[Service Bus Queues, Topics and Subscriptions](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview).
|
|
245
253
|
|
|
246
254
|
## Contributing
|
|
247
255
|
|
|
248
|
-
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/tree/
|
|
256
|
+
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/tree/083d38dc872d6071e0951461af48a6cbe8e09bc1/CONTRIBUTING.md) to learn more about how to build and test the code.
|
|
249
257
|
|
|
250
258
|

|