You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/08/02 06:50:20 UTC

[jira] [Resolved] (CAMEL-10215) EventDrivenPollingConsumer is not thread safe when used with ConsumerCache

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

Claus Ibsen resolved CAMEL-10215.
---------------------------------
       Resolution: Fixed
         Assignee: Claus Ibsen
    Fix Version/s: 2.17.3
                   2.16.4

Thanks for reporting and the PR

> EventDrivenPollingConsumer is not thread safe when used with ConsumerCache 
> ---------------------------------------------------------------------------
>
>                 Key: CAMEL-10215
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10215
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.18.0
>            Reporter: Siddharth Sharma
>            Assignee: Claus Ibsen
>             Fix For: 2.16.4, 2.17.3, 2.18.0
>
>
> For static endpoints, if DefaultConsumerTemplate#receive() is used,  ConsumerCache will return the cached instance of PollingConsumer for every thread part of parallel processing of split/aggregate.
> Now, if EventDrivenPollingConsumer is used, returning same cache instance causes race condition in receive and receive(long) as the methods are not thread safe. The ordering of beforePoll, poll and afterPoll needs to be synchronized, otherwise the consumer might end up being suspended in afterPoll and the client whose beforePoll couldn't wake up the suspended thread will get no data.



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