activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Mittler (JIRA)" <>
Subject [jira] Resolved: (AMQCPP-168) Create a connection can block for up to 4 mins under Linux when TCP socket connect() times out
Date Sat, 12 Apr 2008 16:31:43 GMT


Nathan Mittler resolved AMQCPP-168.

    Resolution: Fixed

Patch applied.

I've only applied the decaf portion of the patch. The "soConnectTimeout" property can be passed
in the brokerURI.  This will allow us to pass the value through without affecting the CMS
API.  The new property is documented here

> Create a connection can block for up to 4 mins under Linux when TCP socket connect()
times out
> ----------------------------------------------------------------------------------------------
>                 Key: AMQCPP-168
>                 URL:
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>          Components: CMS Impl
>    Affects Versions: 2.1.3
>         Environment: CentOS 4
>            Reporter: Olivier Langlois
>            Assignee: Nathan Mittler
>             Fix For: 2.2
>         Attachments: AMQCPP_168.patch
>   Original Estimate: 4 hours
>  Remaining Estimate: 4 hours
> With the following code:
> 	{
> 		// Create a ConnectionFactory
> 		std::auto_ptr<cms::ConnectionFactory> pConnectionFactory(
> 			cms::ConnectionFactory::createCMSConnectionFactory( uri ) );
> 		m_pConnection.reset(pConnectionFactory->createConnection());
> 		m_pConnection->start();
> 	}
> The call to createConnection() will block for up to 4 mins if the URI is a TCP address
pointing to an unreachable host.
> In my application, the time out interval is way too long. I would like to have it set
to around 5 sec to 10 seconds.
> I could take care of the fix if you want as all that would be needed is make the socket
non blocking only for the connect() call and manage the time out with a select(). The only
indication I would need is how you ActiveMQ cms architects/designers would like the timeout
specified to the API.
> Using a new property (ie: "connect-timeout")
> hardcoding a small timeout value in TcpSocket
> etc...

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message