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

Claus Ibsen updated CAMEL-23676:
--------------------------------
    Fix Version/s: 4.21.0

> camel-nats - Camel routes body back to the consumer?
> ----------------------------------------------------
>
>                 Key: CAMEL-23676
>                 URL: https://issues.apache.org/jira/browse/CAMEL-23676
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-nats
>    Affects Versions: 4.20.0
>            Reporter: Michael Weiss
>            Priority: Minor
>             Fix For: 4.21.0
>
>
> For me it seems that Camel wants to route the body back into the nats 
> consumer even if `exchangePattern: InOnly` is set.
> I see weird warnings comming from the nats consumer like:
> ```
> {{2026-04-30 10:00:42,547 WARN  
> [org.apache.camel.component.nats.NatsConsumer] (nats:4) Error during 
> processing. Exchange[9EE1F253416E893-0000000000000000]. Caused by: 
> [org.apache.camel.TypeConversionException - Error during type conversion from 
> type: java.io.File to the required type: byte[] with value 
> /mnt/smb/Test/Teile_30-04-2026_09-29-10.xml due to 
> java.nio.file.NoSuchFileException: 
> /mnt/smb/Test/Teile_30-04-2026_09-29-10.xml]: 
> org.apache.camel.TypeConversionException: Error during type conversion from 
> type: java.io.File to the required type: byte[] with value 
> /mnt/smb/Test/Teile_30-04-2026_09-29-10.xml due to 
> java.nio.file.NoSuchFileException: 
> /mnt/smb/Test/Teile_30-04-2026_09-29-10.xml}}
>  
> {{2026-04-30 10:09:11,305 WARN  
> [org.apache.camel.component.nats.NatsConsumer] (nats:4) Error during 
> processing. Exchange[F4A529DA56F3D6D-0000000000000000]. Caused by: 
> [java.lang.IllegalArgumentException - Message payload size exceed server 
> configuration 269711751 vs 1048576]: java.lang.IllegalArgumentException: 
> Message payload size exceed server configuration 269711751 vs 1048576}}
> ```
> You have to explicitly setBody to null at the end of each route to make this 
> warnings go away.
> This is unexpected, when compared to other MQ components like Spring-RabbitMQ.



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

Reply via email to