oscerd opened a new pull request, #29165:
URL: https://github.com/apache/camel/pull/29165

   Jira: https://issues.apache.org/jira/browse/CAMEL-26587
   
   ### Problem
   
   In `camel-netty`, `NettyPayloadHelper.setIn` and `setOut` currently 
reconstruct exchange data whenever an incoming payload is an exchange transfer 
object, without checking whether `transferExchange=true` is enabled on the 
endpoint configuration.
   
   ### Change
   
   - In `NettyPayloadHelper`:
     - Added endpoint-aware overloads `setIn(NettyEndpoint endpoint, Exchange 
exchange, Object payload)` and `setOut(NettyEndpoint endpoint, Exchange 
exchange, Object payload)` that check `endpoint != null && 
endpoint.getConfiguration().isTransferExchange()` before reconstructing 
transferred exchange objects.
     - Handled exchange transfer objects as standard message bodies when 
`transferExchange=false`.
     - Deprecated legacy 2-argument `setIn(Exchange, Object)` and 
`setOut(Exchange, Object)` methods (delegating with a null endpoint).
   - Updated `ServerChannelHandler` and `ClientChannelHandler` to pass their 
endpoint when setting message payloads.
   - Added unit tests in `NettyTransferExchangeDisabledTest` verifying that 
transferred exchange objects are treated as regular bodies when 
`transferExchange=false`, and verified `NettyTransferExchangeOptionTest` with 
`transferExchange=true`.
   
   _Claude Code on behalf of oscerd_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to