@azure/service-bus 7.4.0-beta.1 → 7.4.0
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 +12 -0
- package/README.md +1 -1
- package/dist/index.js +13 -25
- package/dist/index.js.map +1 -1
- package/dist-esm/src/connectionContext.js +7 -20
- package/dist-esm/src/connectionContext.js.map +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/serializers/queueResourceSerializer.js +1 -1
- package/dist-esm/src/serializers/queueResourceSerializer.js.map +1 -1
- package/dist-esm/src/serializers/topicResourceSerializer.js +1 -1
- package/dist-esm/src/serializers/topicResourceSerializer.js.map +1 -1
- package/dist-esm/src/serviceBusAtomManagementClient.js +3 -2
- package/dist-esm/src/serviceBusAtomManagementClient.js.map +1 -1
- package/dist-esm/src/util/constants.js +1 -1
- package/dist-esm/src/util/constants.js.map +1 -1
- package/dist-esm/src/util/utils.js.map +1 -1
- package/package.json +3 -6
- package/types/3.1/service-bus.d.ts +22 -4
- package/types/latest/service-bus.d.ts +23 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
## 7.4.0 (2021-11-08)
|
|
4
|
+
|
|
5
|
+
### Features Added
|
|
6
|
+
|
|
7
|
+
- Allowing the service API version to be configurable when using `ServiceBusAdministrationClient` as part of the constructor client options.
|
|
8
|
+
Supported versions being "2021-05" and "2017-04".
|
|
9
|
+
[#18254](https://github.com/Azure/azure-sdk-for-js/pull/18254)
|
|
10
|
+
|
|
11
|
+
### Bugs Fixed
|
|
12
|
+
|
|
13
|
+
- Resolves an issue ([#17932](https://github.com/Azure/azure-sdk-for-js/issues/17932)) of receivers not being closed correctly when service bus client is closed.
|
|
14
|
+
|
|
3
15
|
## 7.4.0-beta.1 (2021-10-04)
|
|
4
16
|
|
|
5
17
|
### Features Added
|
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ Install the latest version for the Azure Service Bus client library using npm.
|
|
|
37
37
|
- An [Azure subscription](https://azure.microsoft.com/free/)
|
|
38
38
|
- A [Service Bus Namespace](https://docs.microsoft.com/azure/service-bus-messaging/)
|
|
39
39
|
|
|
40
|
-
### Configure
|
|
40
|
+
### Configure TypeScript
|
|
41
41
|
|
|
42
42
|
TypeScript users need to have Node type definitions installed:
|
|
43
43
|
|
package/dist/index.js
CHANGED
|
@@ -151,7 +151,7 @@ function isError(err) {
|
|
|
151
151
|
*/
|
|
152
152
|
const packageJsonInfo = {
|
|
153
153
|
name: "@azure/service-bus",
|
|
154
|
-
version: "7.4.0
|
|
154
|
+
version: "7.4.0"
|
|
155
155
|
};
|
|
156
156
|
/**
|
|
157
157
|
* @internal
|
|
@@ -1299,7 +1299,7 @@ function buildQueue(rawQueue) {
|
|
|
1299
1299
|
status: rawQueue[STATUS],
|
|
1300
1300
|
enableExpress: getBoolean(rawQueue[ENABLE_EXPRESS], "enableExpress"),
|
|
1301
1301
|
availabilityStatus: rawQueue[ENTITY_AVAILABILITY_STATUS],
|
|
1302
|
-
maxMessageSizeInKilobytes:
|
|
1302
|
+
maxMessageSizeInKilobytes: getIntegerOrUndefined(rawQueue[MAX_MESSAGE_SIZE_IN_KILOBYTES])
|
|
1303
1303
|
};
|
|
1304
1304
|
}
|
|
1305
1305
|
/**
|
|
@@ -1739,7 +1739,7 @@ function buildTopic(rawTopic) {
|
|
|
1739
1739
|
status: rawTopic[STATUS],
|
|
1740
1740
|
enableExpress: getBoolean(rawTopic[ENABLE_EXPRESS], "enableExpress"),
|
|
1741
1741
|
availabilityStatus: rawTopic[ENTITY_AVAILABILITY_STATUS],
|
|
1742
|
-
maxMessageSizeInKilobytes:
|
|
1742
|
+
maxMessageSizeInKilobytes: getIntegerOrUndefined(rawTopic[MAX_MESSAGE_SIZE_IN_KILOBYTES])
|
|
1743
1743
|
};
|
|
1744
1744
|
}
|
|
1745
1745
|
/**
|
|
@@ -1969,7 +1969,7 @@ class ServiceBusAdministrationClient extends coreHttp.ServiceClient {
|
|
|
1969
1969
|
constructor(fullyQualifiedNamespaceOrConnectionString1, credentialOrOptions2,
|
|
1970
1970
|
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
|
1971
1971
|
options3) {
|
|
1972
|
-
var _a;
|
|
1972
|
+
var _a, _b;
|
|
1973
1973
|
let options;
|
|
1974
1974
|
let fullyQualifiedNamespace;
|
|
1975
1975
|
let credentials;
|
|
@@ -2014,6 +2014,7 @@ class ServiceBusAdministrationClient extends coreHttp.ServiceClient {
|
|
|
2014
2014
|
this.endpointWithProtocol = fullyQualifiedNamespace.endsWith("/")
|
|
2015
2015
|
? "sb://" + fullyQualifiedNamespace
|
|
2016
2016
|
: "sb://" + fullyQualifiedNamespace + "/";
|
|
2017
|
+
this.serviceVersion = (_b = options.serviceVersion) !== null && _b !== void 0 ? _b : CURRENT_API_VERSION;
|
|
2017
2018
|
this.credentials = credentials;
|
|
2018
2019
|
this.namespaceResourceSerializer = new NamespaceResourceSerializer();
|
|
2019
2020
|
this.queueResourceSerializer = new QueueResourceSerializer();
|
|
@@ -3632,7 +3633,7 @@ class ServiceBusAdministrationClient extends coreHttp.ServiceClient {
|
|
|
3632
3633
|
getUrl(path, queryParams) {
|
|
3633
3634
|
const baseUri = `https://${this.endpoint}/${path}`;
|
|
3634
3635
|
const requestUrl = coreHttp.URLBuilder.parse(baseUri);
|
|
3635
|
-
requestUrl.setQueryParameter(API_VERSION_QUERY_KEY,
|
|
3636
|
+
requestUrl.setQueryParameter(API_VERSION_QUERY_KEY, this.serviceVersion);
|
|
3636
3637
|
if (queryParams) {
|
|
3637
3638
|
for (const key of Object.keys(queryParams)) {
|
|
3638
3639
|
requestUrl.setQueryParameter(key, queryParams[key]);
|
|
@@ -6241,30 +6242,17 @@ var ConnectionContext;
|
|
|
6241
6242
|
const logPrefix = `[${context.connectionId}]`;
|
|
6242
6243
|
try {
|
|
6243
6244
|
connectionLogger.verbose(`${logPrefix} Permanently closing the amqp connection on the client.`);
|
|
6244
|
-
// Close all the senders.
|
|
6245
6245
|
const senderNames = Object.keys(context.senders);
|
|
6246
|
-
connectionLogger.verbose(`${logPrefix} Permanently closing ${senderNames.length} senders.`);
|
|
6247
|
-
for (const senderName of senderNames) {
|
|
6248
|
-
await context.senders[senderName].close();
|
|
6249
|
-
}
|
|
6250
|
-
// Close all MessageReceiver instances
|
|
6251
6246
|
const messageReceiverNames = Object.keys(context.messageReceivers);
|
|
6252
|
-
connectionLogger.verbose(`${logPrefix} Permanently closing ${messageReceiverNames.length} receivers.`);
|
|
6253
|
-
for (const receiverName of messageReceiverNames) {
|
|
6254
|
-
await context.messageReceivers[receiverName].close();
|
|
6255
|
-
}
|
|
6256
|
-
// Close all MessageSession instances
|
|
6257
6247
|
const messageSessionNames = Object.keys(context.messageSessions);
|
|
6258
|
-
connectionLogger.verbose(`${logPrefix} Permanently closing ${messageSessionNames.length} session receivers.`);
|
|
6259
|
-
for (const messageSessionName of messageSessionNames) {
|
|
6260
|
-
await context.messageSessions[messageSessionName].close();
|
|
6261
|
-
}
|
|
6262
|
-
// Close all the ManagementClients.
|
|
6263
6248
|
const managementClientsEntityPaths = Object.keys(context.managementClients);
|
|
6264
|
-
connectionLogger.verbose(`${logPrefix} Permanently closing ${
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6249
|
+
connectionLogger.verbose(`${logPrefix} Permanently closing all the senders(${senderNames.length}), MessageReceivers(${messageReceiverNames.length}), MessageSessions(${messageSessionNames.length}), and ManagementClients(${managementClientsEntityPaths.length}).`);
|
|
6250
|
+
await Promise.all([
|
|
6251
|
+
...senderNames.map((n) => context.senders[n].close()),
|
|
6252
|
+
...messageReceiverNames.map((n) => context.messageReceivers[n].close()),
|
|
6253
|
+
...messageSessionNames.map((n) => context.messageSessions[n].close()),
|
|
6254
|
+
...managementClientsEntityPaths.map((p) => context.managementClients[p].close())
|
|
6255
|
+
]);
|
|
6268
6256
|
connectionLogger.verbose(`${logPrefix} Permanently closing cbsSession`);
|
|
6269
6257
|
await context.cbsSession.close();
|
|
6270
6258
|
connectionLogger.verbose(`${logPrefix} Permanently closing internal connection`);
|