We are using Spring Boot 2.7.8 with Spring Cloud Stream 3.2.6 & Spring Cloud 2021.0.5
We are using the functional definition for our Kafka consumers, hence adding the consumers channel names under spring.cloud.function.definition
list.
Previously (on Spring boot 2.2.6) when we added the module for bus refresh <spring-cloud-bus>
it was automatically creating a channel that consume the bus-refresh events.
With the new functional way, we using spring-cloud-bus 3.1.2 and facing some strange behavior as the definition of the busrefresh channel busConsumer
is getting overridden by our own channels definition list.
Seems like the busConsumer
is indeed being added automatically to spring.cloud.function.definition
by this Class org.springframework.cloud.bus.BusEnvironmentPostProcessor
but it's adding it into a different property source name than our application properties source name (We are using spring-cloud-starter-consul to load our YML properties).
This causes the application property source to have preceding over the springCloudBusOverridesProperties
property source, hence only our consumers are being initialized correctly, but the busConsumer does not initialize.
Is there a way to enforce it to be added automatically and effectively to the list of definitions without getting overridden?