The client is using 0.5 built from trunk in early April, so maybe
different from the current 0.5 release version. 

-----Original Message-----
From: Gordon Sim [mailto:[email protected]] 
Sent: 09 June 2009 13:37
To: [email protected]
Cc: [email protected]
Subject: Re: c++ client has memory leak when queue is full and the
client tries to reconnect

Shan Wang wrote:
> I fixed it by adding session.close() before calling
> FailoverManager::connect() again after disconnect. So it seems the
> resource leaked was from uncleaned sessions. I forgot to mention this
> problem only affects Windows client. 

Ok, glad you got it fixed though it sounds like there may be some fix 
also required in the windows client side IO(?).

> Besides, on windows I can call
> session.close() without having the session binding with any
connection(
> I mean creating a session object but haven't called
> connect().newSession() ), but on Linux this will cause a crash, the
> cause seems to be from the mutex the session is using.

What version are you using? Invoking close on an invalid session (i.e. 
one not returned by newSession()) should no longer result in an error. 
Invoking other methods will do however.

> Another question is, what the FailoverManager does when the current
> connection becomes unavailable? As I understand it, FailoverManager
will
> try to reconnect once according to the policy specified and if failed
it
> will set the state to CAN'T CONNECT and give up. So if my cluster has
> two brokers and both of them are out of reach, am I right that client
> application has to reconnect by calling
> FailoverManager::connect()explicitly?

Yes, that is right.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

The information contained in this email is strictly confidential and for the 
use of the addressee only, unless otherwise indicated. If you are not the 
intended recipient, please do not read, copy, use or disclose to others this 
message or any attachment. Please also notify the sender by replying to this 
email or by telephone (+44 (0)20 7896 0011) and then delete the email and any 
copies of it. Opinions, conclusions (etc.) that do not relate to the official 
business of this company shall be understood as neither given nor endorsed by 
it. IG Index plc is a company registered in England and Wales under number 
01190902. VAT registration number 761 2978 07. Registered Office: Friars House, 
157-168 Blackfriars Road, London SE1 8EZ. Authorised and regulated by the 
Financial Services Authority. FSA Register number 114059.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to