Camel
  1. Camel
  2. CAMEL-3727

Recipient list with parallel processing doesn't reuse aggregation threads

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.7.0
    • Component/s: camel-core
    • Labels:
      None

      Description

      When I'm using recipient list in parallel mode aggregateExecutorService in MulticastProcessor doesn't reuse threads and is creating one new thread per each request.

      To reproduce this bug simply add a loop to RecipientListParallelTest.testRecipientListParallel() test:

      RecipientListParallelTest.java
          public void testRecipientListParallel() throws Exception {
              for (int i = 0; i < 10000; i++) {
                  MockEndpoint mock = getMockEndpoint("mock:result");
                  mock.reset();
                  mock.expectedBodiesReceivedInAnyOrder("c", "b", "a");
                  template.sendBodyAndHeader("direct:start", "Hello World", "foo", "direct:a,direct:b,direct:c");
                  assertMockEndpointsSatisfied();
              }
          }
      

      In the logs you can find:

      2011-02-28 13:22:30,984 [) thread #0 - RecipientListProcessor-AggregateTask] DEBUG MulticastProcessor             - Done aggregating 3 exchanges on the fly.
      2011-02-28 13:22:31,984 [) thread #4 - RecipientListProcessor-AggregateTask] DEBUG MulticastProcessor             - Done aggregating 3 exchanges on the fly.
      2011-02-28 13:22:32,984 [) thread #8 - RecipientListProcessor-AggregateTask] DEBUG MulticastProcessor             - Done aggregating 3 exchanges on the fly.
      2011-02-28 13:22:34,000 [ thread #12 - RecipientListProcessor-AggregateTask] DEBUG MulticastProcessor             - Done aggregating 3 exchanges on the fly.
      2011-02-28 13:22:35,000 [ thread #14 - RecipientListProcessor-AggregateTask] DEBUG MulticastProcessor             - Done aggregating 3 exchanges on the fly.
      2011-02-28 13:22:36,000 [ thread #15 - RecipientListProcessor-AggregateTask] DEBUG MulticastProcessor             - Done aggregating 3 exchanges on the fly.
      2011-02-28 13:22:37,015 [ thread #16 - RecipientListProcessor-AggregateTask] DEBUG MulticastProcessor             - Done aggregating 3 exchanges on the fly.
      2011-02-28 13:22:38,015 [ thread #17 - RecipientListProcessor-AggregateTask] DEBUG MulticastProcessor             - Done aggregating 3 exchanges on the fly.
      

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        2h 51m 1 Claus Ibsen 28/Feb/11 15:20
        Resolved Resolved Closed Closed
        238d 20h 15m 1 Daniel Kulp 25/Oct/11 12:36
        Daniel Kulp made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Claus Ibsen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Claus Ibsen added a comment -

        trunk: 1075372.

        Show
        Claus Ibsen added a comment - trunk: 1075372.
        Claus Ibsen made changes -
        Fix Version/s 2.7.0 [ 12316021 ]
        Fix Version/s 2.8.0 [ 12316226 ]
        Hide
        Claus Ibsen added a comment -

        Thanks for reporting. I got this covered now. Running full tests before committing the fix.

        Show
        Claus Ibsen added a comment - Thanks for reporting. I got this covered now. Running full tests before committing the fix.
        Claus Ibsen made changes -
        Field Original Value New Value
        Assignee Claus Ibsen [ davsclaus ]
        Fix Version/s 2.8.0 [ 12316226 ]
        Priority Critical [ 2 ] Major [ 3 ]
        Marcin Kolda created issue -

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            Marcin Kolda
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development