5

I'm trying to inject activemq properties from a yaml configuration file.

i initially used a property file, and it worked pretty well, but with the yaml file, the property spring.activemq.broker-url is apparently ignored by spring-jms, and the default broker url is used (tcp://localhost:61616) with as result a "Failed to connect to [tcp://localhost:61616] after: 10 attempt(s) continuing to retry" of course.

here's my yaml configuration

spring: 
 activemq: 
  broker-url: tcp://someIP:61616
  user: admin
  password: admin
  pooled: true

The yaml file is loaded since other configuration properties were correctly detected, i don't know if there's any issue with using yaml to setup activemq configuration..

Any help would be much appreciated !

mab
  • 176
  • 2
  • 13
  • 2
    For the record, `spring-jms` has nothing to do with this. Spring Boot is actually processing that file. Stupid question: are you sure that this file is actually read? It should be named `application.yml` at the same location as the properties file was. – Stephane Nicoll Jun 15 '15 at 07:29
  • Yes i'm quite sure. As i said in the first thread, some other properties were set up on the same yaml file and loaded correctly, the only ones not working are those related to activemq – mab Jul 28 '15 at 16:29
  • Are you sure you added the dependency (in you pom.xml if using maven): `org.springframework.boot:spring-boot-starter-activemq` – рüффп Dec 04 '20 at 11:55
  • also, if you enable connection pooling, you need to add another dependency: `org.messaginghub:pooled-jms` (to your pom.xml if you use maven); and the property is: `spring.activemq.pool.enabled=true` – рüффп Feb 09 '21 at 13:29

0 Answers0