Benedikt Waldvogel created CAMEL-7411:
-----------------------------------------
Summary: 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
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)