From 442f04dadf9561ed0aea504cbd856efb6f1e32de Mon Sep 17 00:00:00 2001 From: buildmaster Date: Tue, 9 Apr 2019 16:53:16 +0000 Subject: [PATCH] Bumping versions --- README.adoc | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.adoc b/README.adoc index db123aa66..cdd361398 100644 --- a/README.adoc +++ b/README.adoc @@ -134,6 +134,8 @@ 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.`. acknowledgeMode:: @@ -376,6 +378,9 @@ 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.`. @@ -585,6 +590,35 @@ Default: `no limit` NOTE: In the case of RabbitMQ, content type headers can be set by external applications. Spring Cloud Stream supports them as part of an extended internal protocol used for any type of transport -- including transports, such as Kafka (prior to 0.11), that do not natively support headers. +== Using Existing Queues/Exchanges + +By default, the binder will automatically provision a topic exchange with the name being derived from the value of the destination binding property ``. +The destination defaults to the binding name, if not provided. +When binding a consumer, a queue will automatically be provisioned with the name `.` (if a `group` binding property is specified), or an anonymous, auto-delete queue when there is no `group`. +The queue will be bound to the exchange with the "match-all" wildcard routing key (`#`) for a non-partitioned binding or `-` for a partitioned binding. +The prefix is an empty `String` by default. +If an output binding is specified with `requiredGroups`, a queue/binding will be provisioned for each group. + +There are a number of rabbit-specific binding properties that allow you to modify this default behavior. + +If you have an existing exchange/queue that you wish to use, you can completely disable automatic provisioning as follows, assuming the exchange is named `myExchange` and the queue is named `myQueue`: + +* `spring.cloud.stream.binding..destination=myExhange` +* `spring.cloud.stream.binding..group=myQueue` +* `spring.cloud.stream.rabbit.bindings..consumer.bindQueue=false` +* `spring.cloud.stream.rabbit.bindings..consumer.declareExchange=false` +* `spring.cloud.stream.rabbit.bindings..consumer.queueNameGroupOnly=true` + +If you want the binder to provision the queue/exchange, but you want to do it using something other than the defaults discussed here, use the following properties. +Refer to the property documentation above for more information. + +* `spring.cloud.stream.rabbit.bindings..consumer.bindingRoutingKey=myRoutingKey` +* `spring.cloud.stream.rabbit.bindings..consumer.exchangeType=` + +* `spring.cloud.stream.rabbit.bindings..producer.routingKeyExpression='myRoutingKey'` + +There are similar properties used when declaring a dead-letter exchange/queue, when `autoBindDlq` is `true`. + == Retry With the RabbitMQ Binder When retry is enabled within the binder, the listener container thread is suspended for any back off periods that are configured.