代码之家  ›  专栏  ›  技术社区  ›  T.Coutlakis

是否将节点RED连接到RabbitMQ优先级队列?

  •  0
  • T.Coutlakis  · 技术社区  · 7 年前

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

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

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

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

    我收到以下错误:

    “AMQP输入节点断开连接错误:操作失败:QueueDeclare;406 (Predition-FAILED),消息为“Predition\u FAILED-inequivalent vhost“vhost”中队列“myqueue”的参数“x-max-priority”:已收到 “none but current”是“signedint”类型的值“10”

    0 回复  |  直到 7 年前
        1
  •  1
  •   T.Coutlakis    6 年前

    答案如下。

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

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