[ 
https://issues.apache.org/jira/browse/CAMEL-26183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136873#comment-18136873
 ] 

Claus Ibsen commented on CAMEL-26183:
-------------------------------------

PR: https://github.com/apache/camel/pull/29008

The producer now encodes a CharSequence like a String, converts any other body 
(stream, file, ...) to a byte[] with the type converter, and fails fast with a 
MllpInvalidMessageException when the body cannot be converted (such as a Map). 
Upgrade guide entry added, as an InOnly route with such a body used to complete 
and now fails.

_Claude Code on behalf of Claus Ibsen (davsclaus)_

> camel-mllp - the producer sends a stream, Map or POJO body as an empty MLLP 
> message and then times out waiting for the ack
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26183
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26183
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-mllp
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> Found while adding the catalog body types of mllp (CAMEL-24961, PR #28413).
> h4. 1. A body that is not a String or byte[] is sent as an empty message
> {{MllpTcpClientProducer.process}} (main 2a465aa4814c, line 162 to 172) 
> handles only a {{byte[]}} or {{String}} body. For any other body (an 
> InputStream, a Map, a POJO) the payload stays null, an empty MLLP envelope is 
> written, and the producer then waits until the receive timeout for an 
> acknowledgement that does not come. Checked on 4.24.0-SNAPSHOT with a local 
> mllp consumer and producer, sending a ByteArrayInputStream body.
> Proposed: convert other bodies to byte[] with the type converter (mandatory), 
> and fail fast with a clear error when the body cannot be converted.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to