You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by yogu13 <yo...@gmail.com> on 2015/05/27 18:33:55 UTC

camel-jms asyncStartListener Issue

Hi,

I am facing a strange issue when i set asyncStartListener to true for a
camel-jms component. I notice that camel doesn't go ahead and create a
connection (Queue) with the JMS Provider (Weblogic). The only thing is i
have wrapped the ConnectionFactory instead of using the JMS Providers
directly. What i notice is if i set the asyncStartListener to false it
connects to the provider correctly.

One more thing probably that is worth mentioning here is the wrapped
connection factory would be little slower than the vendors provider as it
does a JNDI lookup in createConnection method.

i checked the camel-jms code and noticed that incase of asyncStartListener
(true) it uses a ExecutorService, does this service have a timeout of any
kinds within which if a connection isn't received it terminates ?

is yes can this be changed or can it be overcome ?

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/camel-jms-asyncStartListener-Issue-tp5767551.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-jms asyncStartListener Issue

Posted by frouxel <fr...@gmail.com>.
yogu13 wrote
> ok .. i got the code working, i was mistaken to think there was a timeout
> happening, but actually there wasnt..
> 
> All is good now..
> 
> Thank you!
> 
> Regards,
> -Yogesh

Dear Yogesh,

I am facing same behavior, with Camel (2.12.4) JMS Endpoint and Websphere
(8.5.5.5) MQ connection factory, except that I don't use asyncStartListener
but route autoStartup is set to false and started later on demand.

Could you please give more details on how you solved above issue?




--
View this message in context: http://camel.465427.n5.nabble.com/camel-jms-asyncStartListener-Issue-tp5767551p5780255.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-jms asyncStartListener Issue

Posted by yogu13 <yo...@gmail.com>.
ok .. i got the code working, i was mistaken to think there was a timeout
happening, but actually there wasnt..

All is good now..

Thank you!

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/camel-jms-asyncStartListener-Issue-tp5767551p5767816.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-jms asyncStartListener Issue

Posted by yogu13 <yo...@gmail.com>.
Spliting the logic and taking less time for creation of connection worked...

There seems to be a timeout happening somewhere underneath Let me see if i
can build a testcase to showcase this.

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/camel-jms-asyncStartListener-Issue-tp5767551p5767580.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-jms asyncStartListener Issue

Posted by yogu13 <yo...@gmail.com>.
Hello Claus,

I understand what you say ... but what puzzles me is when asyncStartListener
is set to false .. it works like a charm.. if a timeout was happening it
should have been consistent.

I am going to try splitting the logic for creation of InitialContext and
actual creation of connection from the connection factory across different
phases (so that the async thread only creates from the connection from
already created IntialContext and ConnectionFactory) and check...

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/camel-jms-asyncStartListener-Issue-tp5767551p5767562.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-jms asyncStartListener Issue

Posted by Claus Ibsen <cl...@gmail.com>.
Its using the connection factory to create the connection, so any
timeout must come from the vendor of the jms client if they offer such
kind.

ActiveMQ has connection timeout options etc.

Camel uses the JMS API and there is no such timeout, so you have to
look at WebLogic to see what they offer.

On Wed, May 27, 2015 at 6:33 PM, yogu13 <yo...@gmail.com> wrote:
> Hi,
>
> I am facing a strange issue when i set asyncStartListener to true for a
> camel-jms component. I notice that camel doesn't go ahead and create a
> connection (Queue) with the JMS Provider (Weblogic). The only thing is i
> have wrapped the ConnectionFactory instead of using the JMS Providers
> directly. What i notice is if i set the asyncStartListener to false it
> connects to the provider correctly.
>
> One more thing probably that is worth mentioning here is the wrapped
> connection factory would be little slower than the vendors provider as it
> does a JNDI lookup in createConnection method.
>
> i checked the camel-jms code and noticed that incase of asyncStartListener
> (true) it uses a ExecutorService, does this service have a timeout of any
> kinds within which if a connection isn't received it terminates ?
>
> is yes can this be changed or can it be overcome ?
>
> Regards,
> -Yogesh
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-jms-asyncStartListener-Issue-tp5767551.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/