@golevelup/nestjs-rabbitmq
Advanced tools
Comparing version 3.3.0 to 3.4.0
@@ -6,2 +6,8 @@ # Change Log | ||
# [3.4.0](https://github.com/golevelup/nestjs/compare/@golevelup/nestjs-rabbitmq@3.3.0...@golevelup/nestjs-rabbitmq@3.4.0) (2022-10-31) | ||
### Features | ||
- **rabbitmq:** add the option to avoid declaring exchanges ([#506](https://github.com/golevelup/nestjs/issues/506)) ([5c9a78f](https://github.com/golevelup/nestjs/commit/5c9a78fb9d17816650d1adc984d0d9ced2f10fbc)) | ||
# [3.3.0](https://github.com/golevelup/nestjs/compare/@golevelup/nestjs-rabbitmq@3.2.0...@golevelup/nestjs-rabbitmq@3.3.0) (2022-09-21) | ||
@@ -8,0 +14,0 @@ |
@@ -121,3 +121,9 @@ "use strict"; | ||
// Always assert exchanges & rpc queue in default channel. | ||
this.config.exchanges.forEach((x) => channel.assertExchange(x.name, x.type || this.config.defaultExchangeType, x.options)); | ||
this.config.exchanges.forEach((x) => { | ||
const { createExchangeIfNotExists = true } = x; | ||
if (createExchangeIfNotExists) { | ||
return channel.assertExchange(x.name, x.type || this.config.defaultExchangeType, x.options); | ||
} | ||
return channel.checkExchange(x.name); | ||
}); | ||
if (this.config.enableDirectReplyTo) { | ||
@@ -221,5 +227,11 @@ await this.initDirectReplyQueue(channel); | ||
var _a; | ||
this.selectManagedChannel((_a = rpcOptions === null || rpcOptions === void 0 ? void 0 : rpcOptions.queueOptions) === null || _a === void 0 ? void 0 : _a.channel).addSetup(async (channel) => { | ||
let result; | ||
this.selectManagedChannel((_a = rpcOptions === null || rpcOptions === void 0 ? void 0 : rpcOptions.queueOptions) === null || _a === void 0 ? void 0 : _a.channel) | ||
.addSetup(async (channel) => { | ||
const consumerTag = await this.setupRpcChannel(handler, rpcOptions, channel); | ||
result = { consumerTag }; | ||
res({ consumerTag }); | ||
}) | ||
.then(() => { | ||
res(result); | ||
}); | ||
@@ -226,0 +238,0 @@ }); |
@@ -9,2 +9,3 @@ /// <reference types="node" /> | ||
type?: string; | ||
createExchangeIfNotExists?: boolean; | ||
options?: Options.AssertExchange; | ||
@@ -11,0 +12,0 @@ } |
{ | ||
"name": "@golevelup/nestjs-rabbitmq", | ||
"version": "3.3.0", | ||
"version": "3.4.0", | ||
"description": "Badass RabbitMQ addons for NestJS", | ||
@@ -64,3 +64,3 @@ "author": "Jesse Carter <jesse.r.carter@gmail.com>", | ||
}, | ||
"gitHead": "757012918cb3ce8ddd75a0d2a37fd5fc99ba294d" | ||
"gitHead": "dd634bec5e7094b518ea9c191ea6c908db530553" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
133731
1095