Skip to content

Commit

Permalink
Merge pull request #1168 from moleculerjs/issue-1167
Browse files Browse the repository at this point in the history
Fix #1167
  • Loading branch information
icebob committed Dec 18, 2022
2 parents 2b17e23 + 7ed2c35 commit 3e8fcef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/transporters/amqp.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ class AmqpTransporter extends Transporter {
* @memberof AmqpTransporter
*/
subscribeBalancedRequest(action) {
if (!this.channel) return;

const queue = `${this.prefix}.${PACKET_REQUEST}B.${action}`;
return this.channel
.assertQueue(queue, this._getQueueOptions(PACKET_REQUEST, true))
Expand All @@ -449,6 +451,8 @@ class AmqpTransporter extends Transporter {
* @memberof AmqpTransporter
*/
subscribeBalancedEvent(event, group) {
if (!this.channel) return;

const queue = `${this.prefix}.${PACKET_EVENT}B.${group}.${event}`;
return this.channel
.assertQueue(queue, this._getQueueOptions(PACKET_EVENT + "LB", true))
Expand Down

0 comments on commit 3e8fcef

Please sign in to comment.