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

camel-core - Limit auto conversion when stream caching is enabled

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.22.0, 4.0-RC2, 4.0.0
    • came-core
    • None
    • Unknown

    Description

      When stream caching is enabled which is the case by default since 3.17, all body types that can be converted into a StreamCache are automatically converted which could be a problem when the body type is not a stream and we don't want to have the body as a stream.

      For example, if we use a CXF producer, the resulting body is of type Response but when the stream caching is enabled, it is automatically converted into StreamCache so we have no more access to the rest of the data available in Response, in other words, we somehow lost info.

      The goal of this improvement is to find a way to limit the auto conversation to StreamCache to some specific classes like subclasses of StreamSource, InputStream and Reader, to avoid converting unwanted types just because a converter exists.

      One way could be to provide a list of allowed classes.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            nfilotto Nicolas Filotto
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: