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

   Thanks Federico, good finds, and thanks for checking them against a broker. 
Fixed in adab12a2276b:
   
   1. The pollEnrich of the file name hint now reads the file with 
`noop=true&idempotent=false` and `timeout: 5000`, and keeps the body with 
`variableReceive` set to the name of the `setVariable` (a `setBody` gets no 
`variableReceive`, as it sets the body). The hint says why: `noop=true` alone 
reads each file once, and the timeout ends the wait when there is no file.
   2. In `pollEnrich`, `enrich`, `recipientList`, `routingSlip` and 
`dynamicRouter` the hint no longer suggests `resource:file:`. `pollEnrich` gets 
a `file:` uri with `fileName` and the timeout, `enrich` is told to read a file 
with `pollEnrich`, and the routing EIPs are told that their expression gives 
endpoint uris.
   3. The file option check now reads the options as Camel does 
(`URISupport.parseQuery`, RAW aware), skips a placeholder that is an operand of 
`&&` or `||` (`hasPlaceholderAsLogicalOperand`), and `YamlLines` reads a quoted 
value as YAML does (`''` and `\"`). Two more cases of the same kind are fixed 
too: a uri value with a space (the uri pattern of the line stopped at the 
space), and `+` for a space in a uri. A test covers each case, and the r26 
mistakes are still refused.
   4. Each key now gets its own changed line, in order, so there is one 
instruction per key with its own line and value. Tested with your two keys.
   5. a) The note uses the pattern the runtime sends with: `exchangePattern` of 
the endpoint first, then `pattern` of the `to:`, then the pattern of the 
exchange.
      b) `disableReplyTo=true` (in the uri or under `parameters:`) gives no 
note.
      c) We leave this one as it is. The note is advisory. After a consumer 
that calls InOut, the reply as the body is often what the route wants, as it 
goes back to the caller. A note on every `to: jms` after such a consumer would 
be noise. The note is for a route that asks for InOut on the `to:` itself, as 
in the benchmark step.
      d) A `setBody` later on the main path now hides the note: after the `to:` 
in its list, after the EIP that holds the `to:`, or in a `doFinally`. One that 
runs only on a failure (`doCatch`, `onException`, `onFallback`) does not.
   
   Over the r23 to r26 benchmark traces (2,934 files) the notes and messages 
are the same as before these fixes.
   
   A correction to my earlier comment on the `setsBody()` walk: a `setBody` in 
one `when` branch does not hide the note for a `to:` in a sibling branch. That 
path never runs the `setBody`, so the note stays, and it is right there. What a 
`setBody` in one branch does hide is the note for a `to:` before the `choice`. 
A test now pins that.
   
   _Claude Code on behalf of Claus Ibsen (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