绑定是否需要将 arguments/settings 与 Spring RabbitMQ 中的队列相匹配?

Does a binding need to match the arguments/settings with the queue in Spring RabbitMQ?

在 Spring 引导中给定以下 Queue (RabbitMQ) bean...

@Bean
Queue exampleQueue() {
    return QueueBuilder.durable("exampleQueue")
            .quorum()
            .singleActiveConsumer()
            .build();
}

@Bean
public DirectExchange directExchange() {
    return ExchangeBuilder.directExchange("direct-exchange")
            .durable(true)
            .build();
}

...我在审查的代码中发现了以下 Binding 定义:

@Bean
Binding exampleBinding(DirectExchange directExchange, Queue exampleQueue) {
    final Binding binding = BindingBuilder.bind(exampleQueue)
            .to(directExchange)
            .with("example-routing-key");
    binding.addArgument("x-queue-type", "quorum");
    binding.addArgument("x-single-active-consumer", "true");
    return binding;
}

我的问题是:这些额外的参数 x-queue-typex-single-active-consumer 是否有必要?我的理解是,队列已经定义了这些设置,因此绑定不会明确重复它们?

那些是队列参数,不是绑定参数所以,不,它们不是必需的;大概 RabbitMQ 只是忽略了它们。