Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12441

MulticastProcessor doProcessParallel blocks indefinitly if exception occurs in it.next()

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.20.3, 2.21.0
    • 2.20.4, 2.21.1, 2.22.0
    • camel-core
    • None
    • Windows 8, java 1.8.0_162, camel 2.21.0

    • Unknown

    Description

      After upgrading from camel 2.17.5 to 2.21.0 the following problem was encountered:

      Context:
      A camel RouteBuilder with a split :

      MyRouteBuilder.java
      public class MyRouteBuilder extends RouteBuilder {
          @Override
          public void configure() throws Exception {
               from("direct:in")
                       .split()
                            .xtokenize("//someTocken", 'i', NAMESPACES)
                            .aggregationStrategy(nw UseLatestAggregationStrategy())
                            .stopOnException()
                            .parallelAggregate()
                            .parallelProcessing()
                            .executorServiceRef("splitExecutorService").stopOnException()
                            .streaming().stopOnException()
                            .id("xml-splitter")
                      .to("direct:out")
                      .routeId(getClass().getSimpleName());
          } 
      }
      

      Problem encountered:
      A malformed xml arrives on this route. it.hasNext() returns true but it.next() throws an exception. This causes an indefinite wait in MulticastProcessor at line 374.

      Reason:
      A call to countDown on aggregationOnTheFlyDone is never performed and thus the latch waits indefinitely.

      Possible solution:
      A call to aggregationOnTheFlyDone .countDown inside the catch corresponding to the try surrounding the while.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            davsclaus Claus Ibsen
            shellysoft Bodor Maria Mihaela
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment