[
https://issues.apache.org/jira/browse/CAMEL-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089626#comment-13089626
]
Mathieu Lalonde commented on CAMEL-4227:
----------------------------------------
I've started a patch for this. I used the boolean option *blockWhenFull*
(default: false) to be specified in the Endpoint URI.
While working on the patch I noticed that the CollectionProducer does not
really pull its weight anymore in the SedaProducer -> CollectionProducer ->
ASyncProducer hierarchy. It also forces the SedaProducer to downcast (safely):
{code}
if (blockWhenFull) {
((BlockingQueue<Exchange>) queue).put(exchange);
} else {
queue.add(exchange);
}
{code}
Let me know your thoughts on removing the CollectionProducer from this
hierarchy. It's "technically" API breaking even though there is not much use
in treating a SedaProducer as a CollectionProducer...
> Seda component doesn't block on its blocking queue
> --------------------------------------------------
>
> Key: CAMEL-4227
> URL: https://issues.apache.org/jira/browse/CAMEL-4227
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.7.2
> Reporter: Michael Allman
> Priority: Minor
> Fix For: 2.9.0
>
>
> While one can put an upper bound on the size of the blocking queue that the
> seda component uses to queue messages, the seda component throws an exception
> when it reaches that limit instead of blocking. My understanding of a
> blocking queue is that the upper bound lets you put an upper bound on the
> queue and block when it becomes full. The fact that the seda component throws
> an exception makes the upper bound useless in practice, unless there is
> supposed to be some kind of easy workaround. We have not found one, and it
> looks like we will be rolling our own async component to compensate. :(
> The basic issue is that SedaProducer calls BlockingQueue.add() instead of
> BlockingQueue.put().
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira