rabbitmq – Apply a dynamic group value in Spring Cloud Stream

Spring Boot configuration properties can use property placeholder to be based on other properties or environment variables.

So, the mentioned spring.cloud.stream.bindings.<bindingName>.group can be something like this:

spring.cloud.stream.bindings.MY_INPUT_QUEUE.group=${my.envvar}

This way you can rely on something what is relevant to the environment where your service has started.

See more in docs: docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config.files.property-placeholders

Read more here: Source link