/** * Subscribe to balanced event command * For EVENTB command types * These queues will be used when the "disableBalancer" set to true * * @param {String} event * @param {String} group * @memberof Amqp10Transporter */ subscribeBalancedEvent(event, group) { const queue = `${this.prefix}.${PACKET_EVENT}B.${group}.${event}`; const receiverOptions = Object.assign( { source: { address: queue }, autoaccept: false, session: this.session }, this._getQueueOptions(PACKET_EVENT + "LB", true) ); return this.connection.createReceiver(receiverOptions).then(receiver => { receiver.on("message", this._consumeCB(PACKET_EVENT, true)); this.receivers.push(receiver); }); }
this._getQueueOptions(PACKET_REQUEST, true) ); return this.connection.createReceiver(receiverOptions).then(receiver => { if (this.opts.prefetch !== 0) { receiver.addCredit(this.opts.prefetch);
}); return this.connection.createReceiver(receiverOptions).then(receiver => { if (this.opts.prefetch !== 0) { receiver.addCredit(this.opts.prefetch); session: this.session }); return this.connection.createReceiver(receiverOptions).then(receiver => { receiver.on("message", context => { this._consumeCB(cmd, false)(context);
this.receivers[event] = await this.connection.createReceiver(receiverOptions);