Claus Ibsen created CAMEL-25866:
-----------------------------------

             Summary: docs - the pollEnrich customer file example and the 
jsonpath lookup by a field come among the first two samples of their pages
                 Key: CAMEL-25866
                 URL: https://issues.apache.org/jira/browse/CAMEL-25866
             Project: Camel
          Issue Type: Improvement
          Components: camel-jsonpath, camel-jbang, camel-core
            Reporter: Claus Ibsen
             Fix For: 4.24.0


{{camel_catalog_sample}} of the camel-jbang-mcp server returns the first two 
YAML samples of a page by default (the EIP pages and the languages and 
components). On two pages, the sample a common task needs comes later:
* pollEnrich: the example that reads the file of a customer named by a field of 
the order, with noop=true and variableReceive, is sample 5 of 5 ("The file name 
of a dynamic uri"). The first two are a fixed file with a timeout and a SEDA 
queue named by a header.
* jsonpath: the lookup of one element by a field (filter on a header, 
resultType java.util.Map, null when there is no match) is sample 5, in "Inline 
Simple expressions".

Found in a benchmark of Oct 19-20 2026:
* in an enrich example, 8 of 12 runs read the customer file without noop=true, 
so the first order moved the customer files into customers/.camel and the next 
orders found none;
* in a REST example (GET /orders/{id} from a JSON file, 404 for an unknown id), 
12 of 12 final files had no working way to pick one element of a list by a 
field.

Proposal:
* pollEnrich: the customer file example comes first in "Poll Enrich with 
Dynamic Endpoints", before the SEDA one, with why noop=true is needed, that the 
variable is null when no file is found, and how to unmarshal the variable to 
read its fields. "The file name of a dynamic uri" refers to it.
* jsonpath: the lookup comes second in "Examples", after the choice example; 
"Inline Simple expressions" refers to it.
* No example is removed; eip-samples.json and the catalog copies are 
regenerated.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to