inequivalent arg 'durable' for queue 'queueName' in vhost '/' received 'false' but current is 'true'

    Error while setting up connection for rabbitmq input! Will retry. {:message=>"PRECONDITION_FAILED - inequivalent arg 'durable' for queue 'boot-sis' in vhost '/': received 'true' but current is 'false'"

上述问题场景:

  在利用Rabbitmq收集logack日志,经过logstash数据收集与整理,存储到elasticsearch中。

  意思就是:durable收到的是true,但实际是false.

    RabbitMQ支持消息的持久化,也就是数据写在磁盘上,为了数据安全考虑,我想大多数用户都会选择持久化。消息队列持久化包括3个部分:
  (1)exchange持久化,在声明时指定durable => true
  (2)queue持久化,在声明时指定durable =>true

在整合的过程需要注意一下设置的durable都对应为true.

logback.xml设置

logstash.conf设置

https://www.elastic.co/guide/en/logstash/current/plugins-inputs-rabbitmq.html    logstash与rabbitmq具体配置官方 

代码中自定义绑定的设置

最后查询rabbitmq中durable是否正确                                           

微信公众号

                          
原文地址:https://www.cnblogs.com/niugang0920/p/12188060.html