You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2016/12/01 10:33:56 UTC

Re: camel-jms

JMS connection pool configurations may have failover / reconnect logic.
As well as JMS clients may have vendor specific features for this,
such as ActiveMQ with the failover url. Other vendors have likely
something similar.
Its not in the JMS spec and thus not a general way of configuring and
setting this up.

So both camel-jms and camel-sjms can do reconnect if you configure it
correctly with your JMS client / connection pool.

On Wed, Nov 30, 2016 at 9:19 PM, Quinn Stevenson
<qu...@pronoia-solutions.com> wrote:
> You’re not missing anything - that’s the way the camel-jms and camel-sjms components work.  They get a connection from the connection factory when they startup, and the keep using it.  You can configure the Camel route to handle some JMS Exceptions and sometimes get the reconnect to work that way.
>
> But the easiest way (and what I usually do) is connect to ActiveMQ using a failover URL.  If you do that, you’ll see the ActiveMQ client trying to reconnect periodically.  You don’t need to have more than one ActiveMQ server in the URL - with one, it will just keep trying to reconnect using the same URL.
>
>> On Nov 30, 2016, at 12:48 PM, sa_james <sa...@hotmail.com> wrote:
>>
>> What u describe is failover. What I mean is for the client to wait until a
>> machine that went down, comes back up while the client is looping waiting to
>> reconnect.
>> camel-sjms does not even let you know that the connection has been lost.
>> Camel just silently continues to run while the connection is gone. Am I
>> missing something?
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/camel-jms-tp5790832p5790836.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: camel-jms

Posted by sa_james <sa...@hotmail.com>.
See this link
<http://camel.465427.n5.nabble.com/stand-alone-problem-tp5790885.html>  for
how my problem was solved.
 BAsically, use /main.run()/ instead of /main.start()/



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

Re: camel-jms

Posted by sa_james <sa...@hotmail.com>.
Funnily enough, when I swap the activeMQConnectionFactory with
websphereConnectionFactory, spring does the reconnect.
I might be missing something.



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

Re: camel-jms

Posted by sa_james <sa...@hotmail.com>.
Id did the testing with Spring trying to reconnect to a Websphere and I did
configured the factory as follows:

    <bean id="factory"
class="org.springframework.jms.connection.CachingConnectionFactory">
        <property name="targetConnectionFactory" ref="webSphereMQConFac"/>
        <property name="reconnectOnException" value="true"/>
    </bean>

Sadly it does not reconnect. What I am missing?

Thanks. 



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