Если свойство destination
является списком с разделителями-запятыми, контейнер слушателя будет создан для каждого получателя и привязан к одному и тому же слушателю.
Вы также можете установить для свойства multiplex
значение true, поэтому мытолько один контейнер прослушивает несколько тем.
spring.cloud.stream.binding.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. Under normal circumstances, the end
* users are not expected to enable or disable this property directly.
*/
private boolean multiplex;
Последнее предложение неверно;Вы должны установить его, чтобы включить его.