activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ttmdev <>
Subject Re: connection initialization order
Date Tue, 11 Mar 2008 15:04:54 GMT

It is not necessary to start your connection before setting it up (i.e.,
create sessions, listeners, etc.). As a matter fact, the JMS specification
recommends that you start your connection after you've completed your setup.
Here's the statement from the specification. 

"It is typical to leave the Connection in stopped mode until setup is
complete. At that point the Connection’s start() method is called and
messages begin arriving at the Connection’s consumers. This setup convention
minimizes any client confusion that may result from asynchronous message
delivery while the client is still in the process of setting itself up."

Goto for a free ActiveMQ user guide

gali_ka wrote:
> 'm using activemq in my c++ application. In the examples published on the
> active-mq site, I saw that connection->start() is called immediately after
> creating connection. Is it necessary to call Connection::start() before
> creating session, setting exception listener, creating consumer and
> producer? Can I create and set all the connection members and call
> connection->start() to be the last command in my connect process?

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message