I'm working with SQS spring-boot:spring-cloud, I want to externalize the parameter, retrieve the value based on the active profile
@MessageMapping("static.queue")
public void receiveMessage(Payload payload) {
// ...
}
is there any way to solve this problem?
something like
@MessageMapping("${properties.dynamic}")
public void receiveMessage(Payload payload) {
// ...
}
I would try two options:
spring-could-aws
. You can annotate your SQS queue listener with @SqsAnnotation
. @JmsListener
).public class Example {
@MessageMapping("${spring.app}")
public void receiveMessage(Payload payload) {
// do
}}
in yml file:
spring:
profiles: prod
app: 'queueName1'
spring:
profiles: dev
app: 'queueName2'