Modify @JMSListener destination while building the app(not runtime)

134 Views Asked by At

I have developed a @JMSListener that gets the destination from Spring yml files and works just fine.

But now I would need to be able to change the "destination" of the queue on deployment time without having to reset the whole application

@Component
public class MyListener{

  //SOME_VARIABLES
 @JmsListener(destination = "${tibco.configuration.queues}")
    public void receiveMessage(Message message) {
        //DO_SOME_STUFF
    }

In my application.yml and manifest.yml ,i have below

spring:
  application:
    name: my-tibco-service-1

So when i buld the service using my-tibco-service-1 ,tibco.configuration.queues= queue-100 when i buld the service using my-tibco-service-2 ,tibco.configuration.queues= queue-101 when i buld the service using my-tibco-service-3 ,tibco.configuration.queues= queue-102

0

There are 0 best solutions below