Many thanks for the various offers of help I got. I think I have solved the problem. The weird core dumping was due to a bad build, due to some spurious copies of header files of mine that were out of step with the proper ones. Fixed. Now the build is clean I do see the behaviour I expect from AMQ. The ExceptionListener works on the server side and I can now cope with the Q mgr being restarted. This makes me think that the MQSeries behaviour is actually wrong. I think the JMS spec says that the error handling mechanim should be to deliver exceptions via the registered ExceptionListener.
I wonder if I should use an ExceptionListener on the client side. It is not nice to test the connection by writing a spurious message (heartbeat) to the request queue, it is rather crude and could clog the Q up. What do people think? Is anyone else using ExceptionListeners on the client side? Regards, Andrew Marlow Internet tabish...@gmail.com 16/06/2010 13:15 Please respond to users@activemq.apache.org To users@activemq.apache.org cc Subject Re: Fw: AMQ-cpp problem with ExceptionListener, receive and lost connection 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. > 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? 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 ___________________________________________________________ This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is prohibited. Please refer to http://www.bnpparibas.co.uk/en/information/legal_information.asp?Code=ECAS-845C5H for additional disclosures.