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

Hubertus Willuhn commented on CAMEL-19576:
------------------------------------------

Thanks. This works but only if the split is single threaded, if I use 
split().threads(2), this option seems not to work as expected.

from(seda)
...
to(direct:split?synchronous=true)
...


from(direct:split)
split().threads(2)
...
.end()

> Undocumented Behavior of SEDA Consumer in Combination with Split
> ----------------------------------------------------------------
>
>                 Key: CAMEL-19576
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19576
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core, camel-seda
>    Affects Versions: 3.4.6, 3.10.0, 3.15.0
>            Reporter: Hubertus Willuhn
>            Priority: Major
>              Labels: split, thread
>         Attachments: SedaThreadingTest.java
>
>
> We are using SEDA consumers in combination with split expression and thread 
> pool for processing data. We did an upgrade from Camel 2 to Camel 3 and now 
> encounter a critical change in behavior.
> *Which Camel Versions are affected?*
> We tested Camel 3.4.6 to 3.15.0.
> *Which Java Versions are affected*
> Java 8 (OpenJDK, Oracle) and Java 11 (OpenJDK)
> *What is the problem?*
> Before upgrading to Camel 3.x, we use routes consuming from seda endpoints, 
> with a single thread, processing the exchanges. Within the same route, a 
> split will be used with a custom thread-pool. The expected behavior is, that 
> the seda thread blocks until the split is done, and will continue down the 
> route to the end of the route, after the split end. However, this behavior 
> changed with Camel 3.x, which breaks the routing logic for us, and does not 
> match to the current documentation of "split" EIP.
> The "feature" which seems to be broken is the fact documented for split 
> option "parallelProcessing" (in 
> https://camel.apache.org/components/3.20.x/eips/split-eip.html#_options): 
> _Note the caller thread will still wait until all messages has been fully 
> processed, before it continues._
> I attached a test that should show what the issue is. We would expect that 
> the test "testSedaThreads" succeeds.
> *The question is:*
> Are we doing something wrong, is documentation missing or not up to date, or 
> is this an unwanted behavior?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to