activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tab...@fusesource.com>
Subject Re: Windows C++ Hang on connection.Start creating a producer
Date Tue, 15 Feb 2011 15:48:51 GMT
On Tue, 2011-02-15 at 07:42 -0800, ChicagoBob123 wrote:
> We are testing our C++ Windows application. We pointed to an IP Address where
> there was no ActiveMQ server running. Bleow is the code snipet. The
> brokerURI  is failover:(tcp://192.168.14.100:61616)
> we also tried tcp://192.168.14.100:61616           
> createConnection always comes back with no issues. When we execute start the
> application hangs. Never comes back. Is there a setting to kill start if it
> doesnt find a server/connection? 
> 
>           auto_ptr<ConnectionFactory> connectionFactory(
>           ConnectionFactory::createCMSConnectionFactory( brokerURI ) );
> 
>           // Create a Connection
>           if(useauthentication) 
>             connection =
> connectionFactory->createConnection(UserName,Password);
>           else
>             connection = connectionFactory->createConnection();
> 
>           connection->start();

This behavior is expected when using failover.  You can configure the
failover transport to control how many times it will attempt to
connect / reconnect before giving up.  See the Uri Configuration
reference here:

http://activemq.apache.org/cms/configuring.html

Regards


-- 
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/



Mime
View raw message