If the destination
property is a comma-delimited list a listener container will be created for each destination and bound to the same listener.
You can also set the multiplex
property to true so we only have one container listening on multiple topics.
spring.cloud.stream.bindings.foo.consumer.multiplex=true
.
/**
* When set to true, the underlying binder will natively multiplex destinations on the
* same input binding. For example, in the case of a comma separated multiple
* destinations, the core framework will skip binding them individually if this is set
* to true, but delegate that responsibility to the binder.
*
* By default this property is set to `false` and the binder will individually bind
* each destinations in case of a comma separated multi destination list. The
* individual binder implementations that need to support multiple input bindings
* natively (multiplex) can enable this property.
*/
private boolean multiplex;
You have to set the multiplex property to enable it.