Claus Ibsen created CAMEL-24808:
-----------------------------------
Summary: camel-jbang-examples: revamp into a real-world ladder of
examples
Key: CAMEL-24808
URL: https://issues.apache.org/jira/browse/CAMEL-24808
Project: Camel
Issue Type: Improvement
Components: examples
Reporter: Claus Ibsen
The examples repository is three things at once: the on-ramp for a person's
first hour with Camel, reference material that AI assistants learn Camel from,
and the task set any assistant is measured against. Today's 30 examples serve
none of them well: the level field mixes difficulty with infrastructure
("beginner" holds a JFR leak demo next to timer-log; "intermediate" mostly
means "needs Docker"); the basics people ask about first are missing (error
handling, file processing, an HTTP client call, XML/JSON/CSV mapping,
properties and profiles); descriptions do not state observable behaviour;
nothing says what an example teaches.
h3. Proposal
* A quick-start group kept as it is: timer-log, rest-api, routes, splitter.
Generic, one or two files, no service.
* A ladder of real-world examples, one new concept per rung, with one fictional
web shop (orders, customers, inventory, invoices) running through it so data
and names are shared:
** 1 run: order-generator, nightly-report, properties-and-profiles
** 2 transform and map: json-transform, xml-to-json, csv-to-json, data-mapping,
groovy, xslt
** 3 route: content-based-router, order-lines, aggregator, filter-and-multicast
** 4 fail well: error-handling, circuit-breaker
** 5 connect without a service: stock-api, file-processing, http-client
** 6 connect to one service via camel infra: sql, artemis, mqtt, kafka-orders,
ftp
** 7 contracts and security: openapi-server, openapi-client,
keycloak-security-rest
** 8 AI: langchain4j-chat, mcp-server, openai-pii-redaction,
docling-langchain4j-rag
** 9 cloud: aws-sqs
* A showcase group on the side for tooling demos such as memory-leak and
message-size.
* Descriptions rewritten as the behaviour you observe. New metadata field
{{teaches}} (components, EIPs, languages, data formats). {{level}} becomes the
group or rung name. Rung 6 examples declare their third-party dependencies
explicitly.
* Every ladder README gets a "Build it step by step" section: four to six edits
from a timer route to the finished example.
* Few advanced examples; financial-doc-analyzer, keycloak-introspection-rest,
aws-s3-event-based and cron-log are dropped. No backwards compatibility is
kept; the CLI example listing and the catalog tools are updated with the
repository.
h3. Order of work
# Metadata pass over the existing examples, one PR, no route changes.
# The additions, rung by rung.
# The step-by-step sections.
# The CLI and catalog tool updates.
Follow-up to CAMEL-21426, which created the repository. Related: CAMEL-23774
(recipes catalog, which can index {{teaches}}).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)