Skip to content

Commit 925356b

Browse files
authored
Excluding AMQ autoconfiguration in Spring Boot so that camel-activemq… (apache#93)
* Excluding AMQ autoconfiguration in Spring Boot so that camel-activemq configuration settings get used * commenting spring boot option spring.activemq.broker-ur as it is no longer needed
1 parent d2b31a6 commit 925356b

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

activemq/src/main/java/sample/camel/SampleAmqApplication.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@
1717
package sample.camel;
1818

1919
import org.springframework.boot.SpringApplication;
20+
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
2021
import org.springframework.boot.autoconfigure.SpringBootApplication;
22+
import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration;
23+
2124

2225
//CHECKSTYLE:OFF
26+
@EnableAutoConfiguration(exclude = {ActiveMQAutoConfiguration.class})
2327
@SpringBootApplication
2428
public class SampleAmqApplication {
2529

activemq/src/main/resources/application.properties

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@
1818
# to keep the JVM running
1919
camel.springboot.main-run-controller = true
2020

21-
# setup camel-activemq-starter with the url of the remote broker
22-
# you can change the port number to 61617 and reconfigure conf/activemq.xml to use port 61617 instead of 61616
23-
# to try using a different port than the default
24-
# because spring boot comes with activemq support out of the box when it detects activemq JARs
25-
# then you need to configure the broker-url in spring-boot
26-
# the configuration on camel.component.activemq.broker-url is not really in use but is recommended
27-
# to be configured so camel-activemq has the same setting
28-
spring.activemq.broker-url=tcp://localhost:61616
21+
# Setup camel-activemq-starter with the url of the remote broker.
22+
# You can change the port number to 61617 and reconfigure conf/activemq.xml to use port 61617 instead of 61616
23+
# to try using a different port than the default.
24+
# Because spring boot comes with activemq support out of the box when it detects activemq JARs
25+
# then you need to configure the broker-url in spring-boot.
26+
# Unless the application is configured for
27+
# @EnableAutoConfiguration(exclude = {
28+
# ActiveMQAutoConfiguration.class
29+
# })
30+
# the configuration on camel.component.activemq.broker-url is not really in use.
31+
# But is recommended to be configured so camel-activemq has the same setting
32+
# spring.activemq.broker-url=tcp://localhost:61616
2933
camel.component.activemq.broker-url=tcp://localhost:61616
3034

0 commit comments

Comments
 (0)