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

   Stacked on #28178 (it needs the `BodyTypeRegistry`). Review that one first; 
this PR's own change is the last commit. It is independent of #28180.
   
   This lets the body types a workload brought to each step be read and kept. 
For example, run the messages of the expected production workload in a test, 
then see what each EIP has been reached with. There are three ways to read 
them, besides the Java API (the `BodyTypeRegistry` context plugin):
   
   - **JMX:**
     - each processor has `BodyTypes` and `BodyKinds` (`String[]`, kinds as 
`null`, `payload`, `data` or `iterator`);
     - each route counts its steps reached with more than one type 
(`VariedBodyTypes`) and with bodies of more than one kind (`MixedBodyKinds`), 
which need attention.
   
     The route console now reads its `variedBodyTypes`/`mixedBodyKinds` from 
these attributes, instead of counting them itself.
   - **The route coverage dump** (`dumpRoutesCoverageAsXml`, which the Camel 
test kits write when route coverage is enabled) has `bodyTypes` and `bodyKinds` 
attributes on each step a message reached:
     ```xml
     <to id="result" uri="mock:result" exchangesTotal="2" 
totalProcessingTime="0" index="4"
         bodyTypes="java.lang.String,java.util.LinkedHashMap" 
bodyKinds="payload,data"/>
     ```
   - **A new `body-type` dev console** lists the steps a message has reached, 
per route, with their types and kinds. `varied=true` keeps only the steps 
reached with more than one type, and `filter` selects routes. The text form 
uses the same column as `camel cmd route-structure`.
   
   The Message History docs get a "Dumping the body types" section, and the 
catalog gets the new console.
   
   ## Tests
   
   - New `ManagedBodyTypesTest` (camel-management): the JMX attributes, the 
counts, nothing before a message, and the coverage dump.
   - New `BodyTypeDevConsoleTest` (camel-console): steps and kinds, `varied`, 
`filter`, nothing reached yet.
   - The whole camel-management suite (573) and the whole camel-console suite 
(258) pass locally, run against the changed core modules through a scratch 
local repository.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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