Why do my RabbitMQ channels keep closing?

前端 未结 6 1037
时光取名叫无心
时光取名叫无心 2020-12-14 06:53

I\'m debugging some Java code that uses Apache POI to pull data out of Microsoft Office documents. Occasionally, it encounter a large document and POI crashes when it runs o

6条回答
  •  隐瞒了意图╮
    2020-12-14 07:15

    I also had this problem. The reason for my case was that, first I built the queue with durable = false and in the log file I had this error message when I switched durable to true:

    "inequivalent arg 'durable' for queue 'logsQueue' in vhost '/': received 'true' but current is 'false'"

    Then, I changed the name of the queue and it worked for me. I assumed that the RabbitMQ server keeps the record of the built queues somewhere and it cannot change the status from durable to non-durable and vice versa.

    Again I made durable=false for the new queue and this time I got this error

    "inequivalent arg 'durable' for queue 'logsQueue1' in vhost '/': received 'false' but current is 'true'"

    My assumption was true. When I listed the queues in rabbitMQ server by:

    rabbitmqctl list_queues 
    

    I saw both queues in the server.

    To summarize, 2 solutions are: 1. renaming the name of the queue which is not a good solution 2. resetting rabbitMQ by:

    rabbitmqctl stop_app
    rabbitmqctl reset
    rabbitmqctl start_app
    

提交回复
热议问题