user1697841
user1697841

Reputation: 129

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.

Upvotes: 0

Views: 279

Answers (1)

Gary Russell
Gary Russell

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

Related Questions