You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/06/21 06:08:00 UTC

[jira] [Resolved] (CAMEL-16734) Recipient list does not wait for processing an exchange by recipients and ignores aggregation strategy when route is transacted.

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

Claus Ibsen resolved CAMEL-16734.
---------------------------------
    Resolution: Fixed

Thanks for reporting and the detailed analysis and testing which other JIRAs caused this etc.

I was able to come up with a better fix in the aggregator EIP itself and can therefore remove that special _hack_ in the multicast processor.

The 3.11 upgrade doc mention the change in the aggregator eip.

> Recipient list does not wait for processing an exchange by recipients and ignores aggregation strategy when route is transacted.
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-16734
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16734
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 3.7.4, 3.7.2, 3.7.3, 3.8.0, 3.10.0
>            Reporter: Krzysztof Mackowiak
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.11.0
>
>         Attachments: TransactedRecipientListTest.java
>
>
> When migrating to Camel 3.7.2 I've noticed that there is a problem with the recipient list in transacted routes.
> Recipient list does not wait for processing an exchange by recipients and ignores aggregation strategy when :
> - route is transacted,
> - doTry()...doCatch() is used,
> - processing by the recipient takes longer.
> The bug was discovered in version 3.7.2 but it's also present in the newest versions 3.10.0 and 3.7.4 (LTS).
> Here is a test, which reproduces the problem:
> {code:java}
> public class TransactedRecipientListTest extends TransactionClientDataSourceSupport {
>     @Test
>     public void testRecipientList() throws Exception {
>         System.out.println("Running on version : " + context.getVersion());
>         String response = template.requestBody("direct:start", "Hello World", String.class);
>         assertEquals("Hi !!!", response);
>     }
>     @Override
>     protected RouteBuilder createRouteBuilder() throws Exception {
>         return new RouteBuilder() {
>             @Override
>             public void configure() throws Exception {
>                 // NOTE commenting transacted(), doTry() or delay() make this test green in Camel 3.7.4 and above
>                 // however commenting delay() doest not make this test green in Camel 3.7.2
>                 from("direct:start")
>                         .transacted()
>                         .doTry()
>                             .recipientList(constant("direct:a"))
>                         .endDoTry();
>                 // NOTE doCatch() skipped here to keep test as simple as possible
>                 from("direct:a")
>                         .delay(1000)
>                         .transform(constant("Hi !!!"));
>             }
>         };
>     }
> }
> {code}
> This test is passing with Camel 3.7.1 and below, but it's failing with Camel 3.7.2 and above.
> However it's also passing with Camel 3.9.0 !
> It's also passing on 'main' and '3.7.x' branches after reverting commit b1b5b7d0 : "CAMEL-16550: camel-core - Split and Aggregate with Transacted may cause thread to stuck".
> I've checked a history of MulticastProcessor class and it looks that:
> - CAMEL-16103 introduced the problem.
> - CAMEL-16295 fixed the problem.
> - CAMEL-16550 introduced this problem again.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)