Tuesday, May 31, 2011

Apache-Qpid: Channel-Not-Attached Exception

We are using Apache Qpid in our company for some time but yesterday i got a strange error - no application were able to connect to the Qpid-service anymore - the log file showed me a strange error: "error Client max connection count limit exceeded: 500 connection refused"


This was the second time the error occured. First i checked the projects, if the connections would be safely closed in case of an error, but that was surely the case.
Second i checked the "channel exception: not-attached: channel 1 is not attached" - i counted the occurance of this message between my first 500 connections error message and the second and found out - this error happened exactly 500 times!

So i debugged the code in detail an realized, that the error occured exactly after using Acknowledge() of the Qpid-sender-class. So i removed the line and looked at the qpid-documentation a little bit deeper in detail. I found a good qpid-documentation created bei Red-Hat:
I realized, that the Acknowledge() method intensionally should be used to signal qpid, that a message was successfully received, but not the other way round.

Since then i fixed the line the error never happend again.


No comments: