'Pass multiple queue names to Spring JMSListener
How can i pass multiple queue name to my JmsListener.
@JmsListener(destination = "#{'${solace.jms.queueNames}'.split(',')}"
In my property file:
solace.jms.queueNames =q1,q2,q3
But when I start the Spring Boot app I get the below error:
.s.j.l.DefaultMessageListenerContainer : Setup of JMS message listener invoker failed for destination '[Ljava.lang.String;@1b30a54e' - trying to recover. Cause: Error creating consumer - internal error (Queue name "[Ljava.lang.String;@1b30a54e" contains illegal character [;])
How to resolve it?
Solution 1:[1]
You can define multiple @JMSListener
@JmsListener(destination = "${solace.jms.queueNames[0]}")
@JmsListener(destination = "${solace.jms.queueNames[1]}")
@JmsListener(destination = "${solace.jms.queueNames[2]}")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jeferson Souza |
