gnodet commented on PR #29257:
URL: https://github.com/apache/camel/pull/29257#issuecomment-6735698951

   _Hermès on behalf of gnodet_
   
   @Croway Thank you for the thorough analysis — CAMEL-24392 and CAMEL-10096 
are real constraints. The PR has been reworked with a different approach that 
avoids the regression you identified.
   
   **The LOWEST approach is gone.** The new fix instead makes 
`UnitOfWorkProcessorAdvice` implement `Ordered` and return `Ordered.HIGHEST`, 
while `StreamCachingAdvice` moves from `Ordered.HIGHEST` to `Ordered.HIGHEST + 
1`:
   
   | Phase | Before (broken) | After (fixed) |
   |---|---|---|
   | `before()` | StreamCaching → UoW → tracers | UoW → StreamCaching → tracers 
|
   | `after()` | tracers → UoW → StreamCaching | tracers → StreamCaching → UoW |
   
   This preserves the "cache first" invariant from CAMEL-10096 and CAMEL-24392 
(`before()` still runs StreamCaching before all tracers/debuggers), while 
fixing CAMEL-26640 (`after()` now runs StreamCaching before UoW teardown, so 
the spool file is still alive when `reset()` is called).
   
   The test has also been updated per your feedback:
   - Removed the redundant 5-exchange test
   - Added a spool file cleanup assertion to verify TempFileManager deletes 
`.cos*.tmp` files after exchange completion
   - Used AssertJ `assertThat` for consistency


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