GH-242: Support multiple queue bindings

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/242

Allow a consumer binding to bind its queue with multiple routing keys.

Add `bindingQueueDelimiter` to treat `bindingRoutingKey` as a list.
Resolves #266
This commit is contained in:
Gary Russell
2019-10-22 15:01:53 -04:00
committed by Oleg Zhurakousky
parent 180cd9987e
commit 86b8a3ba5d
4 changed files with 82 additions and 17 deletions

View File

@@ -139,9 +139,14 @@ Whether to automatically declare the DLQ and bind it to the binder DLX.
Default: `false`.
bindingRoutingKey::
The routing key with which to bind the queue to the exchange (if `bindQueue` is `true`).
For partitioned destinations, `-<instanceIndex>` is appended.
Can be multiple keys - see `bindingRoutingKeyDelimiter`.
For partitioned destinations, `-<instanceIndex>` is appended to each key.
+
Default: `#`.
bindingRoutingKeyDelimiter::
When this is not null, 'bindingRoutingKey' is considered to be a list of keys delimited by this value; often a comma is used.
+
Default: `null`.
bindQueue::
Whether to declare the queue and bind it to the destination exchange.
Set it to `false` if you have set up your own infrastructure and have previously created and bound the queue.
@@ -420,10 +425,16 @@ The batch timeout when batching is enabled.
Default: `5000`.
bindingRoutingKey::
The routing key with which to bind the queue to the exchange (if `bindQueue` is `true`).
Only applies to non-partitioned destinations.
Can be multiple keys - see `bindingRoutingKeyDelimiter`.
For partitioned destinations, `-n` is appended to each key.
Only applies if `requiredGroups` are provided and then only to those groups.
+
Default: `#`.
bindingRoutingKeyDelimiter::
When this is not null, 'bindingRoutingKey' is considered to be a list of keys delimited by this value; often a comma is used.
Only applies if `requiredGroups` are provided and then only to those groups.
+
Default: `null`.
bindQueue::
Whether to declare the queue and bind it to the destination exchange.
Set it to `false` if you have set up your own infrastructure and have previously created and bound the queue.