You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ranabroto Ghosh <ra...@globalcharge.com> on 2021/08/24 19:22:43 UTC

camel.component.activemq.broker-url doesnt seem to work with camel-activemq-starter:3.11.1

*#build.gradle*

dependencies {

   implementation 'org.springframework.boot:spring-boot-starter-web'
   implementation 'org.apache.camel.springboot:camel-activemq-starter:3.11.1'
   implementation 'org.apache.camel.springboot:camel-spring-boot-starter:3.11.1'
   implementation 'org.apache.camel:camel-servlet:3.11.1'
   testImplementation 'org.springframework.boot:spring-boot-starter-test'

   compileOnly 'org.projectlombok:lombok'
   annotationProcessor 'org.projectlombok:lombok'
}

*# application.properties*

spring.application.name= amq-load
#spring.activemq.broker-url=
tcp://someip:61616?jms.prefetchPolicy.queuePrefetch=30 "COMMENT:
WORKS"
camel.component.activemq.broker-url=
tcp://someip:61616?jms.prefetchPolicy.queuePrefetch=30 "COMMENT:
DOESNT WORK"
camel.component.activemq.concurrent-consumers= 5 "COMMENT: ALWAYS WORKS"
queue-name= test


Application Starting log: With properties 'camel.component.activemq.broker-url'


21-08-24 20:05:51.553  INFO 25358 --- [           main]
o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s):
8080 (http) with context path ''
2021-08-24 20:05:51.568  INFO 25358 --- [           main]
org.apache.camel.main.RoutesConfigurer   : Loaded 1 additional
RoutesBuilder from:
classpath:camel/*,classpath:camel-template/*,classpath:camel-rest/*
(took 13ms)
2021-08-24 20:05:52.191  INFO 25358 --- [           main]
o.apache.activemq.broker.BrokerService   : Using Persistence Adapter:
MemoryPersistenceAdapter
2021-08-24 20:05:52.343  INFO 25358 --- [           main]
o.apache.activemq.broker.BrokerService   : Apache ActiveMQ 5.16.3
(localhost, ID:ranaub-XPS-15-9570-38327-1629831952194-0:1) is starting
2021-08-24 20:05:52.348  INFO 25358 --- [           main]
o.apache.activemq.broker.BrokerService   : Apache ActiveMQ 5.16.3
(localhost, ID:ranaub-XPS-15-9570-38327-1629831952194-0:1) started
2021-08-24 20:05:52.348  INFO 25358 --- [           main]
o.apache.activemq.broker.BrokerService   : For help or more
information please see: http://activemq.apache.org
2021-08-24 20:05:52.371  INFO 25358 --- [           main]
o.a.activemq.broker.TransportConnector   : Connector vm://localhost
started
2021-08-24 20:05:52.397  INFO 25358 --- [           main]
o.a.c.impl.engine.AbstractCamelContext   : Routes startup summary
(total:3 started:3)
2021-08-24 20:05:52.397  INFO 25358 --- [           main]
o.a.c.impl.engine.AbstractCamelContext   :     Started
route-with-delay (direct://with-delay)
2021-08-24 20:05:52.398  INFO 25358 --- [           main]
o.a.c.impl.engine.AbstractCamelContext   :     Started route-no-delay
(direct://no-delay)
2021-08-24 20:05:52.398  INFO 25358 --- [           main]
o.a.c.impl.engine.AbstractCamelContext   :     Started
route-from-queue (activemq://queue:test)
2021-08-24 20:05:52.398  INFO 25358 --- [           main]
o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.11.1
(camel-1) started in 459ms (build:38ms init:139ms start:282ms)
2021-08-24 20:05:52.404  INFO 25358 --- [           main]
c.g.amq.load.amqload.AmqLoadApplication  : Started AmqLoadApplication
in 2.706 seconds (JVM running for 2.956)


Application Starting log: With properties 'spring.activemq.broker-url'

2021-08-24 20:14:30.610  INFO 26120 --- [           main]
o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s):
8080 (http) with context path ''
2021-08-24 20:14:30.626  INFO 26120 --- [           main]
org.apache.camel.main.RoutesConfigurer   : Loaded 1 additional
RoutesBuilder from:
classpath:camel/*,classpath:camel-template/*,classpath:camel-rest/*
(took 13ms)
2021-08-24 20:14:31.419  INFO 26120 --- [           main]
o.a.c.impl.engine.AbstractCamelContext   : Routes startup summary
(total:3 started:3)
2021-08-24 20:14:31.420  INFO 26120 --- [           main]
o.a.c.impl.engine.AbstractCamelContext   :     Started
route-with-delay (direct://with-delay)
2021-08-24 20:14:31.420  INFO 26120 --- [           main]
o.a.c.impl.engine.AbstractCamelContext   :     Started route-no-delay
(direct://no-delay)
2021-08-24 20:14:31.420  INFO 26120 --- [           main]
o.a.c.impl.engine.AbstractCamelContext   :     Started
route-from-queue (activemq://queue:test)
2021-08-24 20:14:31.421  INFO 26120 --- [           main]
o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.11.1
(camel-1) started in 422ms (build:36ms init:143ms start:243ms)
2021-08-24 20:14:31.435  INFO 26120 --- [           main]
c.g.amq.load.amqload.AmqLoadApplication  : Started AmqLoadApplication
in 2.741 seconds (JVM running for 2.998)


With properties 'camel.component.activemq.broker-url', not
understanding why it printed below line

"Apache ActiveMQ 5.16.3 (localhost,
ID:ranaub-XPS-15-9570-38327-1629831952194-0:1) is starting"

and not connected to the amq but if I use 'spring.activemq.broker-url'
then all works fine. 'camel.component.activemq.concurrent-consumers'
works regardless.

In camel's documentation 'camel.component.activemq.broker-url' is
recommended to use. Any suggestions please ?