camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <cschnei...@talend.com>
Subject AW: Camel "hangs" on ActiveMQ connect
Date Wed, 26 Jan 2011 16:40:47 GMT
I think the options to not have this effect are there in any case. The problem is that the
default is causing the hang.
Probably this can best be solved by the ActiveMQ team. Some warning that no server could be
reached would have saved me.
I will ask on the ActiveMQ list about that problem.

Christian


-----Ursprüngliche Nachricht-----
Von: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Gesendet: Mittwoch, 26. Januar 2011 17:04
An: users@camel.apache.org
Betreff: Re: Camel "hangs" on ActiveMQ connect

On Wed, Jan 26, 2011 at 4:52 PM, Christian Schneider <cschneider@talend.com> wrote:
> Hi Claus,
>
> I know that at least Tibco EMS does the same like ActiveMQ when using failover transport.
This is why we did not use failover for test setups so we could diagnose problems with the
jms server (e.g. wrong URL) easier.
>
> The option did not work. I think it can not really work. As far as I understand it simply
means that camel tries to connect a the start. The problem is that exactly this try to connect
makes camel "hang". I think that endpoints that listen on jms are always started anyway.
>

Ah AMQ has some options to control timeout on initial connection you can set.
I think its startupMaxReconnectAttempts
http://activemq.apache.org/failover-transport-reference.html

We added that option to AMQ and the option to Camel based on req from a fuse customer.


> Christian
>
>
> -----Ursprüngliche Nachricht-----
> Von: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Gesendet: Mittwoch, 26. Januar 2011 16:17
> An: users@camel.apache.org
> Betreff: Re: Camel "hangs" on ActiveMQ connect
>
> On Wed, Jan 26, 2011 at 4:06 PM, Christian Schneider <cschneider@talend.com> wrote:
>> That´s a good thing. What do you think ? Should we somewhere document a warning
about the problem on the wiki page of the jms component?
>>
>
> Christian did you try it?
>
> Yeah we could add a TIP to the camel-jms wiki page to highlight this option.
>
> Mind that the automatic failover thingy is an AMQ specific. Another broker may fail ASAP.
>
>
>> Christian
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Claus Ibsen [mailto:claus.ibsen@gmail.com]
>> Gesendet: Mittwoch, 26. Januar 2011 15:07
>> An: users@camel.apache.org
>> Betreff: Re: Camel "hangs" on ActiveMQ connect
>>
>> Try setting testConnectionOnStartup=true on the jms endpoint. Then it ought to fail
fast.
>>
>>
>>
>> On Wed, Jan 26, 2011 at 3:03 PM, Christian Schneider <cschneider@talend.com>
wrote:
>>> I just found an interesting "problem" with Camel and ActiveMQ.
>>>
>>> I defined my connection factory for jms like below without an explicit url:
>>>   <bean id="connectionFactory"
>>> class="org.apache.activemq.spring.ActiveMQConnectionFactory">
>>>   </bean>
>>>
>>> I had a @Consume("jms:test") annotion in a class somewhere. I had no ActiveMQ
server running.
>>>
>>> When I started the spring context the last line in the log showed 
>>> that the consumer for the annotation started. The problem was that no other route
came up and even the spring initialization did not return.
>>>
>>> It took me a while till I found that the startup of camel hung on the jms connect.
I found that ActiveMQ uses that failover transport when no borker url is given. This transport
style does not throw an exception when no server is present.
>>>
>>> I don´t know if we should do anything about this but it was extremly frustrating
till I found the reason.
>>>
>>> Any opinions?
>>>
>>> Christian
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>



--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message