Currently the only way to detect and recover from a broker disconnect is to set an Exception Listener on the Connection and when it fires you should recreate the resources you were using.
We are currently working on V3.0 of ActiveMQ-CPP which will include failover support but until then the recovery process is a manual one that the user must implement. Regards Tim. On Sun, 2009-01-18 at 22:42 -0800, Patrick Ruckstuhl wrote: > Hi, > > does someone have a real world example for using CMS? > > My situation is the following. > > I have an application that has multiple threads and sends and receives > messages. ActiveMQ itself is running on a different host so it is possible > (and happens form time to time) that the network connection is lost and > therefore we need to handle this situation. > > I found a SessionPool in the cmsutil package, is this the recommended way to > deal with it (have a SessionPool and each threads gets a session from > there). What's needed to set it up? Does it deal with lost connections or if > not how else can I deal with it? > > Thanks and Regards, > Patrick -- Tim Bish http://fusesource.com http://timbish.blogspot.com/