[ 
https://issues.apache.org/jira/browse/CAMEL-14643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17100617#comment-17100617
 ] 

Preben Asmussen commented on CAMEL-14643:
-----------------------------------------

upgraded the example to 3.2.0 to show the error.
Run the app by invoking mvn clean package spring-boot:run
Console output will show that camel tries to connect to the default broker url 
localhost:61616. Where it should have been foo:61617 or bar:61617

2020-05-06 11:18:02.715 WARN 30558 --- [ActiveMQ Task-1] 
o.a.a.t.failover.FailoverTransport : Failed to connect to 
[tcp://localhost:61616] after: 10 attempt(s) continuing to retry.

When invoking the health endpoint on [http://localhost:8080/actuator/health]
The SB cf seems to have picked up the right configured CF
2020-05-06 11:24:19.636 ERROR 33231 --- [nio-8080-exec-1] 
o.a.a.t.failover.FailoverTransport : Failed to Lookup INetAddress for 
URI[ssl://bar:61617] : {}

I was trying to grog a unittest, but I didn't really find some good examples of 
how to setup a broker in failover mode in a unittest. Sorry :(

> Configuring brokerurl leads to duplication in camel-activemq and spring-boot 
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-14643
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14643
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-spring-boot
>    Affects Versions: 3.0.1, 3.1.0
>            Reporter: Preben Asmussen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.4.0
>
>
> When upgrading from camel 3.0.0 to 3.x.x the spring.activemq.broker-url is no 
> longer used when configuring the camel-activemq component. 
> It seems that you now have to specify both the spring property (for the SB 
> health check to work) and the camel.componnt.activemq.broker-u-r-l for the 
> component to work when picking up configuration properties.
> There is an example here [https://github.com/pax95/failover-test] 
> when you omit the camel.component.activemq.broker-u-r-l the component picks 
> up the default localhost broker and not the spring boot one specified by 
> spring.activemq.broker-url
> Maybe there there are some SB bean conditionals missing ?  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to