activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Pechorin <>
Subject Re: How can a producer/consumer tell if its connection is still good?
Date Sat, 10 Dec 2011 20:06:30 GMT
2011/12/10 JRR <>:
> I am using the Active MQ CPP 3.4.0 client.
> We have a multi-threaded application that has multiple producers, and they
> share a single connection. These connections are */not/* fail over
> connections, nor can they be.
> I'm trying to find the fastest, most efficient way to determine if a
> connection is still up?

Check cms::ExceptionListener. You should implement its methods in some
class, then setExceptionListener( ExceptionListener* listener ) on
your connection.

You can also check src\examples\consumers\SimpleAsyncConsumer.cpp:
this example uses ExceptionListener.

View raw message