activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <>
Subject Re: Do activemq-cpp connection questions.
Date Tue, 29 Nov 2011 16:32:19 GMT
On Tue, 2011-11-29 at 08:22 -0800, JRR wrote:
> Hello,
> I've read through the activemq-cpp tutorial at
> and I've poked around
> the forums.
> Do activemq-cpp connection have a timeout when the client is connecting to
> the broker? I ask because reading this post
> (
> comments on a connection being disconnected due to inactivity. Although that
> articles example is Java based as opposed to C++. I've looked through the
> connections class and I do not see anything relating to a connection
> timeout. Do activemqq-cpp connections have a timeout?
> Aside from that what is the process or detecting if a connection is down and
> then reestablishing the connection. For example, suppose the broker is
> restarted, but the producer is not. How would the producer know if its
> connection went down? Is it just that the MessageProducer's send throws an
> exception?
> In order to reestablish the connection is it a matter of reallocating
> everything, connection, session, message producer, etc?
> Are there other tutorials, web sites, etc. that you could refer me to for
> more information on activemq-cpp usage? Perhaps these questions are covered
> there?
> Thank your time,

If you use the failover transport then you don't have to deal with the
problem of reestablishing the connection, the client will do that for
you.  If you don't use that then you need to catch exceptions from the
client calls as well as register an onException handler to know that the
client connection has failed and then tear down and rebuild the CMS

You can view the various configuration options for the transports and
client here:


Tim Bish
Twitter: tabish121

View raw message