删除source_name为空的rabbitmq绑定

8fq7wneg  于 2022-11-23  发布在  RabbitMQ
关注(0)|答案(1)|浏览(106)

详情见下文:

root@beb46cb4b84f:/# rabbitmqctl list_bindings
Listing bindings for vhost /...
source_name     source_kind     destination_name        destination_kind        routing_key     arguments
        exchange        topic_task_worker_manufacture   queue   topic_task_worker_manufacture   []
        exchange        topic_task_worker       queue   topic_task_worker       []
topic_task      exchange        topic_task_worker_manufacture   queue   manufacture.node        []
topic_task      exchange        topic_task_worker       queue   parse.step      []

我有两个绑定,输出为空source_name。现在,我如何删除它们?
我尝试了以下命令,但失败:

root@beb46cb4b84f:/# rabbitmqadmin delete binding source="" destination_type="queue" destination="topic_task_worker" properties_key="topic_task_worker" -u xxxx -p xxxx
Traceback (most recent call last):
  File "/usr/local/bin/rabbitmqadmin", line 1185, in <module>
    main()
  File "/usr/local/bin/rabbitmqadmin", line 524, in main
    method()
  File "/usr/local/bin/rabbitmqadmin", line 767, in invoke_delete
    (obj_type, uri, upload) = self.declare_delete_parse(DELETABLE)
  File "/usr/local/bin/rabbitmqadmin", line 787, in declare_delete_parse
    (uri, upload) = self.parse_args(self.args[1:], obj)
  File "/usr/local/bin/rabbitmqadmin", line 839, in parse_args
    uri = uri_template.format(**uri_args)
KeyError: 'source'
o75abkj4

o75abkj41#

在您的示例中,源代码是topic_task

rabbitmqadmin delete binding source="topic_task" destination_type="queue" destination="topic_task_worker" properties_key="topic_task_worker"

相关问题