BasicMessageConsumer.close doesn't invoke the deregister consumer routine for 
some cases
----------------------------------------------------------------------------------------

                 Key: QPID-793
                 URL: https://issues.apache.org/jira/browse/QPID-793
             Project: Qpid
          Issue Type: Bug
            Reporter: Rajith Attapattu


If you invoke the BasicMessageConsumer.close with sendClose =true, it doesn't 
call the deregisterConsumer routine. This results in the broker closing the 
connection due to the SuspendChannel method sending message credits to invalid 
destinations as consumers that are no longer valid are still retained in the 
map.
Here is the code segment that bypasses the deregisterConsumer. Not sure why 
this done this way. I am going to fix this issue by calling deregisterConsumer 
routing in both occasions. The person who wrote this code originally should 
review and see why this was done in this particular manner.

                if (sendClose)
                {
                    // TODO: Be aware of possible changes to parameter order as 
versions change.
                    sendCancel();
                }
                else
                {
                    // //fixme this probably is not right
                    // if (!isNoConsume())
                    { // done in BasicCancelOK Handler but not sending one so 
just deregister.
                        deregisterConsumer();
                    }
                }

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

Reply via email to