diff --git a/docs/src/main/asciidoc/overview.adoc b/docs/src/main/asciidoc/overview.adoc index 438a06334..3dd864700 100644 --- a/docs/src/main/asciidoc/overview.adoc +++ b/docs/src/main/asciidoc/overview.adoc @@ -114,10 +114,15 @@ Default: none (Spring AMQP default). === RabbitMQ Consumer Properties -NOTE: To avoid repetition, Spring Cloud Stream supports setting values for all channels, in the format of `spring.cloud.stream.default.=`. - The following properties are available for Rabbit consumers only and must be prefixed with `spring.cloud.stream.rabbit.bindings..consumer.`. +However if the same set of properties needs to be applied to most bindings, to +avoid repetition, Spring Cloud Stream supports setting values for all channels, +in the format of `spring.cloud.stream.rabbit.default.=`. + +Also, keep in mind that binding specific property will override its equivalent in the default. + + acknowledgeMode:: The acknowledge mode. + @@ -374,11 +379,14 @@ The customizer (`configure()` method) is provided with the queue name as well as === Rabbit Producer Properties -NOTE: To avoid repetition, Spring Cloud Stream supports setting values for all channels, in the format of `spring.cloud.stream.default.=`. +The following properties are available for Rabbit producers only and must be prefixed with `spring.cloud.stream.rabbit.bindings..producer.`. +However if the same set of properties needs to be applied to most bindings, to +avoid repetition, Spring Cloud Stream supports setting values for all channels, +in the format of `spring.cloud.stream.rabbit.default.=`. + +Also, keep in mind that binding specific property will override its equivalent in the default. -The following properties are available for Rabbit producers only and -must be prefixed with `spring.cloud.stream.rabbit.bindings..producer.`. autoBindDlq:: Whether to automatically declare the DLQ and bind it to the binder DLX. diff --git a/spring-cloud-stream-binder-rabbit/src/test/java/org/springframework/cloud/stream/binder/rabbit/integration/RabbitBinderModuleTests.java b/spring-cloud-stream-binder-rabbit/src/test/java/org/springframework/cloud/stream/binder/rabbit/integration/RabbitBinderModuleTests.java index 0802533e6..713a50076 100644 --- a/spring-cloud-stream-binder-rabbit/src/test/java/org/springframework/cloud/stream/binder/rabbit/integration/RabbitBinderModuleTests.java +++ b/spring-cloud-stream-binder-rabbit/src/test/java/org/springframework/cloud/stream/binder/rabbit/integration/RabbitBinderModuleTests.java @@ -325,6 +325,7 @@ public class RabbitBinderModuleTests { context = new SpringApplicationBuilder(SimpleProcessor.class) .web(WebApplicationType.NONE).run("--server.port=0", "--spring.cloud.stream.rabbit.default.producer.routing-key-expression=fooRoutingKey", + "--spring.cloud.stream.rabbit.default.consumer.exchange-type=direct", "--spring.cloud.stream.rabbit.bindings.output.producer.batch-size=512", "--spring.cloud.stream.rabbit.default.consumer.max-concurrency=4", "--spring.cloud.stream.rabbit.bindings.input.consumer.exchange-type=fanout");