On Wed, 2010-06-16 at 12:30 +0100, andrew.mar...@uk.bnpparibas.com
wrote:
> I have developed a set of interface classes for my client-server system 
> that allow me to switch in either ActiveMQ or MQSeries. I have been 
> testing what happens when the connection is lost to the Q mgr. I have 
> arranged for the server to halt so that it is restarted from the script 
> that kicks it off in the first place. I have arranged for the client to 
> detect that the connection has gone away and for it to reconnect. With 
> MQSeries this works. Here are some observations about what I had to do to 
> get it work:
> 
> On the client side with ActiveMQ the receive behaves like it times out 
> when the connection goes away. So when that happens I write a heartbeat 
> message to the rqst Q. That does fail if the Q mgr is not there. I found 
> that with MQSeries the receive fails with an exception. So, with MQSeries 
> a heartbeat approach is not needed.  I must admit, the MQSeries behaviour 
> is what I would expect. I was suprised when ActiveMQ didn't do this. Can 
> anyone comment please?
> 
> On the server side I saw similar issues but I react to them differently. I 
> make the server die, since the script that kicks it off will restart it. 
> Eventually when the Q mgr comes back this means the server will be up and 
> running ok. With MQSeries this is just fine, but with ActiveMQ the server 
> just sits in the receive loop. The server cannot write heart beats 
> anywhere so I cannot use that approach on the server side. I tried using 
> an ExceptionListener but it seemed like it was not picking up anything. 
> Using an ExceptionListener was a right pain to add, especially because 
> afterwards I discovered that MQSeries does not need it (or invoke it). 
> What do people do to make their AMQ-cpp servers detect that the Q mgr has 
> gone away?
> 
> I originally picked ActiveMQ to make things easier to develop and test 
> with. It was always going to go into production with MQSeries. It is quite 
> ironic that it ha actually been easier to do the development with 
> MQSeries.
> 
> Regards,
> 
> Andrew Marlow
> 

If you could provide a sample application that demonstrates the issue
that would be helpful, also please provide information on what version
of the client you are using and what versions of APR and APR-util you
have installed.  

Regards



-- 
Tim Bish

Open Source Integration: http://fusesource.com
ActiveMQ in Action: http://www.manning.com/snyder/

Follow me on Twitter: http://twitter.com/tabish121
My Blog: http://timbish.blogspot.com/

Reply via email to