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

StreamCache file is removed before wireTap ends in a splitter wireTap combination route

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.20.1
    • Fix Version/s: 2.21.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When combining the splitter and wireTap functionality an org.apache.camel.RuntimeCamelException (Cannot reset stream from file) will be thrown when:
      1. a spooled StreamCache body is created in the wireTap route
      2. the splitter route ends before the wireTap route

      The splitter will create an Exchange.STREAM_CACHE_UNIT_OF_WORK property to hold the StreamCaches that will be created by the children of the splitter.
      When doing a wireTap in the splitter route, the property will be copied to the wireTap route (when using the wireTap defaults).
      StreamCaches created in the wireTap route will now be added to the property as well and will be closed when the splitter route ends.

      A possible workaround can be to create the wireTap route without copying the original exchange.
      However I think it is better to remove the Exchange.STREAM_CACHE_UNIT_OF_WORK property in the org.apache.camel.processor.WireTapProcessor configureExchange method.

      I attached a maven project with a test to demonstrate the issue.

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              Bas Claessen Bas Claessen

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment