You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Pavel Moravec (JIRA)" <ji...@apache.org> on 2014/03/27 10:26:15 UTC

[jira] [Commented] (QPID-4922) If Consumer close() method is invoked while inside onMessage(), it should be excuted after onMessage() has completed.

    [ https://issues.apache.org/jira/browse/QPID-4922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13949081#comment-13949081 ] 

Pavel Moravec commented on QPID-4922:
-------------------------------------

I tried to apply the patch to upstream client but _msgDeliveryInProgress is never mentioned but referenced by the patch.

Where the variable comes from?

> If Consumer close() method is invoked while inside onMessage(), it should be excuted after onMessage() has completed. 
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-4922
>                 URL: https://issues.apache.org/jira/browse/QPID-4922
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.14, 0.16, 0.18, 0.20, 0.22
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>             Fix For: 0.29
>
>         Attachments: QPID-4922.patch
>
>
> If Consumer close() is called while inside onMessage(), it deadlocks (or will be waiting on a condition that would never be true with the patch for QPID-4574).
> As per the JMS spec, the consumer cannot be closed() until onMessage() method returns.
> Therefore the best solution is to mark that close() has been called and then execute those method once the thread returns from onMessage().



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org