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

StreamCache does not work correctly with MarshalProcessor and pretty much all DataFormats

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.16.0
    • 2.17.0
    • camel-core
    • None
    • Patch Available

    Description

      StreamCache does not work correctly with MarshalProcessor and pretty much all DataFormats

      1. Documentation states that stream caching can be turned on, on a per route basis. The places were we actually try and utilize stream caching only checks if the global option is turned on (MarshalProcessor + PGPKeyAccessDataFormat, I can't find any other meaningful attempts to use stream caching anywhere else) not the per route setting.
      2. Secondly, if we ignore the first problem, only one data formatter tries to use stream caching for unmarshaling: PGPKeyAccessDataFormat. If you try and unzip a large zip file it's contents will be decompressed into memory. The same goes for any other large data formatter conversion (unmarshaling, only).

      Attached is a patch that corrects the first problem and part of the second problem (ZipFileDataFormat, ZipDataFormat and PGPKeyAccessDataFormat).

      A separate issue should probably be opened to fix all the remaining DataFormat implementation to support Stream Caching.

      Attachments

        1. CAMEL_9274.patch
          15 kB
          Aaron Whiteside
        2. CAMEL_9274_v2.patch
          24 kB
          Aaron Whiteside
        3. CAMEL_9274_v3.patch
          12 kB
          Aaron Whiteside

        Activity

          People

            davsclaus Claus Ibsen
            aaronjwhiteside Aaron Whiteside
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: