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

Guillaume Nodet reassigned CAMEL-25621:
---------------------------------------

    Assignee: Guillaume Nodet

> camel-mina - A write that fails is not reported on the exchange when sync is 
> false
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-25621
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25621
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-mina
>            Reporter: Andrea Cosentino
>            Assignee: Guillaume Nodet
>            Priority: Major
>
> {{MinaHelper.writeBody}} waits for the {{WriteFuture}} with 
> {{awaitUninterruptibly(writeTimeout)}} and throws only when that wait times 
> out. When the write completes within the timeout but fails 
> ({{WriteFuture.isWritten()}} is false and {{getException()}} holds the 
> cause), the method returns normally. With {{sync=false}} the producer then 
> completes the exchange as if the message had been sent, although nothing was 
> written. With {{sync=true}} the failure is reported, through the response 
> handler.
> For example, a producer with {{sync=false}} whose codec throws while encoding 
> the message completes the exchange without an exception, and the server 
> receives nothing.
> Proposed change:
> * In {{MinaHelper.writeBody}}, after the wait, throw a 
> {{CamelExchangeException}} with the future's exception when the write did not 
> succeed.
> * Test: a producer with {{sync=false}} whose write fails gets the failure on 
> the exchange.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to