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

ASF GitHub Bot commented on CAMEL-10215:
----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/camel/pull/1099


> 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
>             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)

Reply via email to