activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Pechorin <ivan.pecho...@gmail.com>
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 <jrr@cisco.com>:
> 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.

Mime
View raw message