You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rajith Attapattu (JIRA)" <qp...@incubator.apache.org> on 2008/07/04 05:02:37 UTC

[jira] Closed: (QPID-793) BasicMessageConsumer.close doesn't invoke the deregister consumer routine for some cases

     [ https://issues.apache.org/jira/browse/QPID-793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajith Attapattu closed QPID-793.
---------------------------------


> 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
>          Components: Java Client
>    Affects Versions: M3
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>             Fix For: M3
>
>
> 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.