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

Provide an option for unsynchronized aggregation when splitter is streaming and not parallel

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.13.2
    • 2.14.0
    • camel-core
    • None
    • Patch Available
    • Unknown

    Description

      We use a splitter route that splits very large files.
      The splits need to be aggregated in order.
      The splitter is therefore configured with streaming=true and parallelProcessing=false.

      When there are multiple in-flight exchanges on the route (i.e. different files are being processed) the end-to-end processing time for each file is significantly impacted because each aggregation call is synchronized in MulticastProcessor.doAggregate method..

      It is not uncommon, in our environment, to have thousands of splits per file and the synchronization is significantly impacting the throughput of the route.

      I propose that an option be added (to splitter at least) to allow for an unsynchronized aggregation. The option would default to false for backward compatibility and would possibly be ignored if parallelProcessing = true.

      The body of the MulticastProcess.doAggregate method could be moved to a new, unsynchronized method (say doAggregateInternal). The MulticastProcessor.doAggregate method could remain synchronized (again for backward compatibility) but the body of that method would then call the new unsynchronized doAggregateInternal method. In this way, existing code would remain synchronized.

      The splitter, then, could call the unsynchronized doAggregateInternal method when the unsynchronizedAggregation option was true.

      Attachments

        1. SplitterSynchronizedAggregationTest.java
          4 kB
          Jerry Williamson
        2. camel.multicast.processor.patch
          10 kB
          Jerry Williamson

        Activity

          People

            davsclaus Claus Ibsen
            jwilliamson Jerry Williamson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: