我想
assert a queue in lazy mode into existence
通过使用nodejs的amqplib。
我知道我可以通过创建策略来做到这一点,但我不想这样做,因为在我们现有的环境中很难实现自动化。
我试过以下方法:
let options = {
durable: true,
arguments: {},
lazy: true, //doesnt work
mode: "lazy" //doesnt work
};
if (job.highQueueLengthExpected) {
options.arguments["x-queue-mode"] = "lazy"; //doesnt work
options.arguments["queue-mode"] = "lazy"; //doesnt work
options["x-queue-mode"] = "lazy"; //doesnt work
}
return ch.assertQueue(job.key, options).then(function (ok) {
我是
checking the mode
通过rabbitmq的http api触发
curl -u guest:guest 'localhost:15672/api/queues/{vhostName}/{queueName}'
对于我在断言队列时提供的所有选项,
mode comes back as default