简体   繁体   中英

Configuring dynamic stream input destination name for spring cloud stream aws kinesis binder

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM