amqp-extension 3.1.1 → 3.2.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/dist/consume/utils.js +0 -1
- package/dist/module.js +6 -2
- package/dist/publish/utils.js +0 -1
- package/dist/type.d.ts +0 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [3.2.0](https://github.com/Tada5hi/amqp-extension/compare/v3.1.1...v3.2.0) (2024-03-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* remove unnecessary alias option ([8027d0a](https://github.com/Tada5hi/amqp-extension/commit/8027d0afb2063e5d0387dacf26cd77444dc933e4))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* allways close channel after publishing ([a9b300f](https://github.com/Tada5hi/amqp-extension/commit/a9b300f6ab64d176a656cf9fc485f31a36168a7f))
|
|
12
|
+
|
|
1
13
|
## [3.1.1](https://github.com/Tada5hi/amqp-extension/compare/v3.1.0...v3.1.1) (2024-03-07)
|
|
2
14
|
|
|
3
15
|
|
package/dist/consume/utils.js
CHANGED
package/dist/module.js
CHANGED
|
@@ -157,10 +157,12 @@ class Client {
|
|
|
157
157
|
if (typeof exchangeOptions.routingKey === 'undefined') {
|
|
158
158
|
throw new Error('The routingKey can not be empty if a non default exchange is selected.');
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
const published = channel.publish(this.config.exchange.name, exchangeOptions.routingKey, buffer, (0, publish_1.buildDriverPublishOptions)({
|
|
161
161
|
persistent: true,
|
|
162
162
|
...options,
|
|
163
163
|
}));
|
|
164
|
+
await channel.close();
|
|
165
|
+
return published;
|
|
164
166
|
}
|
|
165
167
|
// publish to default exchange
|
|
166
168
|
const queueName = options.queueName ||
|
|
@@ -171,10 +173,12 @@ class Client {
|
|
|
171
173
|
await channel.assertQueue(queueName, {
|
|
172
174
|
durable: true,
|
|
173
175
|
});
|
|
174
|
-
|
|
176
|
+
const published = channel.sendToQueue(queueName, buffer, (0, publish_1.buildDriverPublishOptions)({
|
|
175
177
|
persistent: true,
|
|
176
178
|
...options,
|
|
177
179
|
}));
|
|
180
|
+
await channel.close();
|
|
181
|
+
return published;
|
|
178
182
|
}
|
|
179
183
|
}
|
|
180
184
|
exports.Client = Client;
|
package/dist/publish/utils.js
CHANGED
package/dist/type.d.ts
CHANGED
package/package.json
CHANGED