You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2023/01/04 09:30:00 UTC

[jira] [Updated] (CAMEL-18619) Stream closed for onException with useOriginalMessage

     [ https://issues.apache.org/jira/browse/CAMEL-18619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-18619:
--------------------------------
    Priority: Minor  (was: Major)

> 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
>            Priority: Minor
>
> 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)