RabbitMQ Binder Properties

默认情况下,RabbitMQ 绑定程序使用 Spring Boot 的 ConnectionFactory。因此,它支持所有 Spring Boot 的 RabbitMQ 配置选项。(有关参考,请参见 Spring Boot documentation)。RabbitMQ 配置选项使用 spring.rabbitmq 前缀。

除了 Spring Boot 选项外,RabbitMQ Binder 还支持以下属性:

spring.cloud.stream.rabbit.binder.adminAddresses

A comma-separated list of RabbitMQ management plugin URLs. Only used when nodes contains more than one entry. Each entry in this list must have a corresponding entry in spring.rabbitmq.addresses. Only needed if you use a RabbitMQ cluster and wish to consume from the node that hosts the queue. See Queue Affinity and the LocalizedQueueConnectionFactory for more information.

默认:空。

spring.cloud.stream.rabbit.binder.nodes

A comma-separated list of RabbitMQ node names. When more than one entry, used to locate the server address where a queue is located. Each entry in this list must have a corresponding entry in spring.rabbitmq.addresses. Only needed if you use a RabbitMQ cluster and wish to consume from the node that hosts the queue. See Queue Affinity and the LocalizedQueueConnectionFactory for more information.

默认:空。

spring.cloud.stream.rabbit.binder.compressionLevel

The compression level for compressed bindings. See java.util.zip.Deflater.

默认:1(BEST_LEVEL)。

spring.cloud.stream.binder.connection-name-prefix

A connection name prefix used to name the connection(s) created by this binder. The name is this prefix followed by #n, where n increments each time a new connection is opened.

默认:无(Spring AMQP 默认值)。