[rabbitmq-discuss] Socket leak in java client library

Iain Hull iain.hull at workday.com
Mon Nov 28 20:39:28 GMT 2011


Hi Steve,

Thanks for the prompt reply and sending on the bug number.

Regards,
Iain.

-----Original Message-----
From: Steve Powell [mailto:steve at rabbitmq.com] 
Sent: 28 November 2011 16:53
To: Iain Hull
Cc: rabbitmq-discuss at lists.rabbitmq.com
Subject: Re: [rabbitmq-discuss] Socket leak in java client library

Hi Iain,

On 28 Nov 2011, at 15:27, Iain Hull wrote:
> The problem occurs when
com.rabbitmq.client.ConnectionFactory.newConnection()
> is called with a bad hostname. In this case
> com.rabbitmq.client.ConnectionFactory.createFrameHandler(Address)
creates a
> socket that is never returned or closed because of an IOException.

and

> There appears to be a similar leak in
> com.rabbitmq.client.ConnectionFactory.newConnection(Address[])
> where connections are created and never returned or closed
> when an IOException occurs...

We are working in this area; we are looking to replace the
ConnectionFactory with another mechanism (ConnectionBuilder) which
doesn't
have this problem.  The ConnectionFactory will still exist, however, 
(though deprecated) and
this problem will be fixed therein.  I have raised Bug 24597 to track
it.

(You should see it in the next release).

Thank you for spotting this.

Steve Powell  (a happy bunny)
----------some more definitions from the SPD----------
avoirdupois (phr.) 'Would you like peas with that?'
distribute (v.) To denigrate an award ceremony.
definite (phr.) 'It's hard of hearing, I think.'
modest (n.) The most mod.



More information about the rabbitmq-discuss mailing list