activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Rodriguez <>
Subject Re: ActiveMQ-CPP Connection monitoring
Date Thu, 04 Feb 2010 07:43:40 GMT
Hi Martin,
I'm not an expert of the Cpp client and I'm more familiar to the .NEt
client, but looking at the ActiveMQConnection.h, it seems the cpp client has
the same exceptions and listeners than the .NET counterpart:

public: // TransportListener

         * Adds a transport listener so that a client can be notified of
events in
         * the underlying transport, client's are always notified after the
event has
         * been processed by the Connection class.  Client's should ensure
that the
         * registered listener does not block or take a long amount of time
to execute
         * in order to not degrade performance of this Connection.
         * @param transportListener
         *      The TransportListener instance to add to this Connection's
set of listeners
         *      to notify of Transport events.
        void addTransportListener( transport::TransportListener*
transportListener );

         * Removes a registered TransportListener from the Connection's set
of Transport
         * listeners, this listener will no longer receive any Transport
related events.  The
         * caller is responsible for freeing the listener in all cases.
         * @param transportListener
         *      The pointer to the TransportListener to remove from the set
of listeners.
        void removeTransportListener( transport::TransportListener*
transportListener );

         * Event handler for the receipt of a non-response command from the
         * transport.
         * @param command the received command object.
        virtual void onCommand( const Pointer<commands::Command>& command );

         * Event handler for an exception from a command transport.
         * @param ex The exception.
        virtual void onException( const decaf::lang::Exception& ex );

         * The transport has suffered an interruption from which it hopes to
        virtual void transportInterrupted();

         * The transport has resumed after an interruption
        virtual void transportResumed();

But, the "problem" in your case is that, while using the failover transport,
these will not be triggered, as they are managed by the failover transport.
Maybe the behaivour in the CPP client is different and the transport
listener will actually report the events, I'll let the experts correct me in
this matter :)


On 4 February 2010 15:01, Martin C. <> wrote:

> Hi,
> I am using the failover transport in ActiveMQ-CPP and I'd like to know if
> there is a similar way to monitor the state of the connection as in the
> Java
> implemention, where you can register a TransportListener to the connection,
> which in turn gets notified if the connection is currently interrupted or
> working.
> Thanks in advance for any help.
> Best regards,
> Martin
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

Sebastien Rodriguez

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message