[
https://issues.apache.org/jira/browse/CAMEL-17162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jeremy Ross updated CAMEL-17162:
--------------------------------
Description:
If a greedy scheduler has a downstream split or multicast with
parallelProcessing=true, it appears to short circuit inflight exchanges and
rapid fire new exchanges. This despite the fact that it has a thread pool size
of 1.
Reproducer:
[https://github.com/jeremyross/splittest|https://github.com/jeremyross/splittest]
{code:java}
from("scheduler:testBug?initialDelay=1000&useFixedDelay=true&delay=60000&greedy=true")
.multicast().parallelProcessing()
.log("test")
.end()
// this should result in the scheduler waiting its delay period before
sending
// another exchange
.setProperty(Exchange.SCHEDULER_POLLED_MESSAGES, constant(false))
.to("mock:parentComplete");
{code}
was:
If a greedy scheduler has a downstream split or multicast with
parallelProcessing=true, it appears to short circuit inflight exchanges and
rapid fire new exchanges. This despite the fact that it has a thread pool size
of 1.
Reproducer:
[https://github.com/jeremyross/splittest|https://github.com/jeremyross/splittest]
{code:java}
from("scheduler:testBug?initialDelay=1000&useFixedDelay=true&delay=60000&greedy=true")
.setHeader("parentExchangeId", simple("${exchangeId}"))
.log("${header.parentExchangeId}-${date:now:yyyy-MM-dd'T'HH:mm:ss.SSS}: " +
"Before the processor the body must be empty : [${body}]")
.multicast().parallelProcessing()
.log("test")
.end()
.log("${header.parentExchangeId}-${date:now:yyyy-MM-dd'T'HH:mm:ss.SSS}: " +
"Split done: [${body}]")
// this should result in the scheduler waiting its delay period before
sending
// another exchange
.setProperty(Exchange.SCHEDULER_POLLED_MESSAGES, constant(false))
.to("mock:parentComplete");
{code}
> greedy scheduler is too greedy
> ------------------------------
>
> Key: CAMEL-17162
> URL: https://issues.apache.org/jira/browse/CAMEL-17162
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 3.12.0
> Reporter: Jeremy Ross
> Priority: Major
>
> If a greedy scheduler has a downstream split or multicast with
> parallelProcessing=true, it appears to short circuit inflight exchanges and
> rapid fire new exchanges. This despite the fact that it has a thread pool
> size of 1.
> Reproducer:
> [https://github.com/jeremyross/splittest|https://github.com/jeremyross/splittest]
> {code:java}
> from("scheduler:testBug?initialDelay=1000&useFixedDelay=true&delay=60000&greedy=true")
> .multicast().parallelProcessing()
> .log("test")
> .end()
> // this should result in the scheduler waiting its delay period before
> sending
> // another exchange
> .setProperty(Exchange.SCHEDULER_POLLED_MESSAGES, constant(false))
> .to("mock:parentComplete");
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)