[
https://issues.apache.org/jira/browse/CAMEL-18619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-18619.
---------------------------------
Resolution: Fixed
> Stream closed for onException with useOriginalMessage
> -----------------------------------------------------
>
> Key: CAMEL-18619
> URL: https://issues.apache.org/jira/browse/CAMEL-18619
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 3.18.0, 3.18.1, 3.18.2
> Reporter: Alvin Kwekel
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 3.21.0, 4.0-M3, 4.0
>
>
> I seems that using onException().useOriginalMessage() with a stream input
> will always result in a closed stream. Uncached streams are closed upon
> reading and cached stream are since 3.18 also closed when converted.
> "Converter for InputStream to byte[] should close stream"
> https://issues.apache.org/jira/browse/CAMEL-18226
> When there is for example an .unmarshal().json() step in the route, and the
> exchange fails after this step, the original stream is closed and can't be
> used in the onException block.
> To demo the behavior I've created a simple example project:
> https://github.com/alvinkwekel/camel-steam-exception-example/tree/main/src/main/java/com/example/camel
--
This message was sent by Atlassian Jira
(v8.20.10#820010)