davsclaus commented on PR #28457:
URL: https://github.com/apache/camel/pull/28457#issuecomment-6414630377

   Thanks for the review, @oscerd.
   
   1. **`AGENTS.md` pointer while the doc is proposed:** intentional, so agents 
find the proposal while the work on it goes on. It matches the map as it is 
today: `design/cross-cutting-binding.adoc` is also `status: proposed` and is 
already listed there.
   
   2. **How it fits with type converters:** a payload mode is a stage of its 
own, not a type converter. Inside the route the engine hook turns payloads into 
data at the same spots as the stream caching advice (`CamelInternalProcessor` 
on the route consumer, `DefaultChannel` per step). A type converter only runs 
when a step asks for a type, so it cannot keep the body as data from step to 
step; the hook can. At the edges the mode adds one fallback type converter 
(data of the mode to `String` / `byte[]` / `InputStream`), which only acts on 
exchanges of a route with a payload mode. `convertBodyTo`, `bodyAs` and bean 
parameter binding still go through the type converters; `marshal` / `unmarshal` 
are unchanged and their result is handled like any other step's; the catalog 
body types stay the Java types the components give, and the validator applies 
the mode on top. This is now its own section, "Type converters, data formats 
and body types", in 5aadd2ff1681.
   
   Two points worth adding about the overall shape:
   
   - **The current behaviour is unchanged.** The mode is opt-in (`default` is 
today's behaviour), so all existing applications run as they are, with the 
`unmarshal` / `marshal` steps and the practices their authors know. The 
Compatibility section now says so.
   - **The hook point is already proven.** Hooking in where the stream caching 
advice does puts the conversion at the right spot (after the consumer and after 
each step, including the error paths) without touching the languages or the 
EIPs.
   
   _Claude Code on behalf of davsclaus_
   


-- 
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