camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-7411) EventDrivenPollingConsumer can lose exchanges when the internal queue is full
Date Tue, 06 May 2014 07:58:15 GMT

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

Claus Ibsen resolved CAMEL-7411.
--------------------------------

    Resolution: Fixed

Thanks for reporting. We now block by default, and there is new options you can use to configure
the initial queue size, and whether to block or not.

Documented at
https://cwiki.apache.org/confluence/display/CAMEL/Polling+Consumer

> EventDrivenPollingConsumer can lose exchanges when the internal queue is full
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-7411
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7411
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.13.0
>            Reporter: Benedikt Waldvogel
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.13.2, 2.14.0
>
>
> The exchange processing in the {{EventDrivenPollingConsumer}} can lose exchanges when
the internal queue is bounded and full.
> The implementation:
> {noformat}
> public void process(Exchange exchange) throws Exception {
>     queue.offer(exchange);
> }
> {noformat}
> The reason is that {{BlockingQueue.offer(...)}} is non-blocking and returns a boolean
which indicates whether the element was added.
> However, the return value is ignored causing the exchange to get lost if it could not
be added.
> A potential workaround is to use an unbounded BlockingQueue (e.g. LinkedBlockingQueue).



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

Mime
View raw message