如何从频道重新绑定/消耗队列?

时间:2018-01-17 09:05:50

标签: rabbitmq amqp node-amqp

我正在使用amqplib在我的node.js服务器中传输邮件。

这是我在队列中侦听的代码:

channel.consume(queue, handler1, { noAck: true })

现在,我想更新消费者以侦听相同的队列

像这样:

channel.consume(queue, handler2, { noAck: true })

我尝试unbindQueue或deleteQueue但不知道为什么会抛出错误Unhandled rejection IllegalOperationError: Channel closing

0 个答案:

没有答案
相关问题