Reputation: 129
Is there a way to configure a consumer stream name via a bean instead of the property spring.cloud.stream.bindings.input.destination= property?
We have a use case where we want to use a stream name susceptible to change and cannot hard code it.
We do not have the stream name available at runtime but is loaded and available as a property source property during bootstrap context initialization.
Upvotes: 0
Views: 279
Reputation: 174554
You can use a placeholder there
spring.cloud.stream.bindings.input.destination=${destination.name:defaultDest}
Then you can pass it in as -Ddestination.name=foo
.
Upvotes: 1