You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2017/01/13 19:04:26 UTC

[jira] [Resolved] (QPIDJMS-251) Thread unsafe use of MessageListener and state variable in JmsMessageConsumer

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

Timothy Bish resolved QPIDJMS-251.
----------------------------------
    Resolution: Fixed

> Thread unsafe use of MessageListener and state variable in JmsMessageConsumer
> -----------------------------------------------------------------------------
>
>                 Key: QPIDJMS-251
>                 URL: https://issues.apache.org/jira/browse/QPIDJMS-251
>             Project: Qpid JMS
>          Issue Type: Bug
>          Components: qpid-jms-client
>    Affects Versions: 0.11.1
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>             Fix For: 0.20.0
>
>
> The assignment of the MessageListener in the MessageConsumer class is done to a non-volatile value that can result in the initial run of the message dispatch thread missing the value and delay dispatch.  Likewise the code uses a state variable to track started state but the value is not accessed in a thread safe way and the state can be missed.  The started value is unnecessary as the internal message queue instance maintains a thread safe running state that can be used for the same information.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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