【问题标题】:While implementing dead-letter queue (DLQ), a channel error is throw在实现死信队列 (DLQ) 时,会抛出通道错误
【发布时间】:2020-04-27 16:15:36
【问题描述】:

渠道错误;协议方法:#method(reply-code=406,reply-text=PRECONDITION_FAILED - vhost 'ecp-audit' 中队列 'ecpauditchannel.ecpqueue' 的不等效参数 'x-dead-letter-exchange':收到值 'DLX'类型为“longstr”但当前为无,class-id=50,method-id=10)

以下是属性文件中设置的配置。

spring.rabbitmq.virtual-host=ecp-audit
spring.cloud.stream.bindings.ecpinputchannel.destination=ecpchannel
spring.cloud.stream.bindings.error.destination=ecpError
spring.cloud.stream.rabbit.bindings.ecpauditinputchannel.consumer.auto-bind-dlq=true
spring.cloud.stream.rabbit.bindings.input.consumer.dlq-ttl=5000

提前致谢

【问题讨论】:

    标签: spring-cloud-stream spring-rabbit


    【解决方案1】:

    vhost 'ecp-audit' 中队列 'ecpauditchannel.ecpqueue' 的不等价 arg 'x-dead-letter-exchange':收到类型为 'longstr' 的值 'DLX' 但当前为无,class-id=50 , method-id=10)

    创建队列后,您无法更改队列参数。

    但目前没有,

    当前队列中没有x-dead-letter-exchange 参数。

    auto-bind-dlq=true

    导致设置此参数。

    您必须删除队列才能设置不同的参数。

    【讨论】:

    • Gary 感谢您的快速回复,但是,我很困惑,因为我正在按照 cloud spring 文档中提供的步骤进行操作。 cloud.spring.io/spring-cloud-stream-binder-rabbit/multi/…
    • 是的;但是如果队列已经创建过一次,而没有设置该属性,则需要先删除队列,例如使用管理控制台,因此可以使用新属性创建它。
    猜你喜欢
    • 2013-11-04
    • 1970-01-01
    • 2021-12-05
    • 2021-02-18
    • 1970-01-01
    • 2020-11-10
    • 1970-01-01
    • 1970-01-01
    • 2016-12-25
    相关资源
    最近更新 更多