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

BatchConsumer - Allow consumers to be batch aware

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-M1
    • 2.0-M2
    • camel-core
    • None

    Description

      Most of the consumers can handle batch but they dont decorate the Exchange with this information.
      Only the file component does this.

      We should expose a BatchConsumer interface to mark a consumer as being batch capable.
      Then this consumer should be able to round up the exchanges beforehand they are processed. This allows us to gather the total number of exchanges in the batch.
      And then afterwards loop this list and emit each exchange with information about: current index out of total.

      This also makes it much easier to support aggregator afterwards as the aggregator will be able to support BatchConsumer and then know when it has the complete batch aggregated.

      In camel-core its the file component that should be batch aware.

      Other components such as: mail, rss, atom, and many others can support this as well.

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              davsclaus Claus Ibsen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: