将 Node-RED 连接到 RabbitMQ 优先级队列?

Connect Node-RED to a RabbitMQ Priority Queue?

我有一个使用以下选项声明的 RabbitMQ 队列:

{
    "queue": "events/online",
    "durable": true,
    "args": {
        "x-max-priority": 10
    }
}

我正在尝试使用 node-red-contrib-amqp 插件从 Node-RED 连接到队列,在连接源下设置了以下拓扑:

{
    "queues": [
        {
            "name": "events/online",
            "durable": true,
            "options": {
                "x-max-priority": 10
            }
        }
    ]
}

我收到以下错误:

"AMQP input node disconnect error: Operation failed: QueueDeclare; 406 (PRECONDITION-FAILED) with message "PRECONDITION_FAILED - inequivalent arg 'x-max-priority' for queue 'myqueue' in vhost 'vhost': received none but current is the value '10' of type 'signedint'""

原来答案如下

确保选中以下复选框:"use AMQP topology definition (JSON) defined below"

{
    "queues": [
        {
            "name": "events/online",
            "durable": true,
            "options": {
                "maxPriority": 10
            }
        }
    ]
}