Enterprise Integration Patterns in Cameleer
Cameleer implements Apache Camel's Enterprise Integration Patterns (EIPs) with the same names, options and semantics; this page lists every one and links to a tested YAML example and its Rust DSL equivalent.
An EIP is a named solution to a messaging problem: filter, route, split, aggregate, retry. In a
route each EIP is a step. The YAML names are Camel's (split, aggregate, circuitBreaker);
the Rust DSL uses snake_case (split, aggregate, circuit_breaker) and closes blocks with
.end(). Every example on the linked pages runs twice in the test suite, once as YAML and once
as Rust, against the same assertions (crates/cameleer-main/tests/docs_guides.rs).
Routing
| EIP | YAML | Rust DSL | page |
|---|---|---|---|
| Pipeline, To, Dynamic To, Step | to, toD, step | to, to_d, step | routing |
| Message Filter | filter | filter | routing |
| Content-Based Router | choice / when / otherwise | choice().when().otherwise().end() | routing |
| Recipient List | recipientList | recipient_list | routing |
| Routing Slip | routingSlip | routing_slip | routing |
| Dynamic Router | dynamicRouter | dynamic_router | routing |
| Multicast | multicast | multicast | routing |
| Wire Tap | wireTap | wire_tap | routing |
| Load Balancer (round robin, random, sticky, weighted, topic, failover, custom) | loadBalance | load_balance | routing |
| Loop | loop | loop_ | routing |
Splitting, aggregating and ordering
| EIP | YAML | Rust DSL | page |
|---|---|---|---|
| Splitter | split | split | split and aggregate |
| Composed Message Processor (split + aggregation strategy) | split with aggregationStrategy | split(..).aggregation_strategy(..) | split and aggregate |
| Aggregator | aggregate | aggregate | split and aggregate |
| Resequencer (batch, stream) | resequence | resequence | split and aggregate |
| Sort | sort | sort | split and aggregate |
Transformation
| EIP | YAML | Rust DSL | page |
|---|---|---|---|
| Message Translator | setBody, transform, setHeader, removeHeaders | set_body, transform, set_header, remove_headers | transformation |
| Marshal, Unmarshal (data formats) | marshal, unmarshal | marshal, unmarshal, marshal_json | transformation |
| Convert Body | convertBodyTo | convert_body_to | transformation |
| Content Enricher | enrich | enrich | transformation |
| Poll Enrich | pollEnrich | poll_enrich | transformation |
| Claim Check | claimCheck | claim_check | transformation |
| Script | script | script, process(cameleer_script::script(..)) | transformation |
Flow control and resilience
| EIP | YAML | Rust DSL | page |
|---|---|---|---|
| Idempotent Consumer | idempotentConsumer | idempotent_consumer | flow control |
| Throttle | throttle | throttle | flow control |
| Delay | delay | delay | flow control |
| Sampling | sample | sample, sample_every | flow control |
| Circuit Breaker | circuitBreaker / onFallback | circuit_breaker().on_fallback() | flow control |
| Validate | validate | validate | flow control |
| Threads | threads | threads, threads_with | flow control |
Interceptors, completions and reuse
| EIP | YAML | Rust DSL | page |
|---|---|---|---|
| Intercept Send To Endpoint | interceptSendToEndpoint | intercept_send_to_endpoint | system |
| Intercept From, Intercept | interceptFrom, intercept | intercept_from, intercept | system |
| On Completion | onCompletion | on_completion | system |
| Saga | saga | saga | system |
| Route Template | routeTemplate, templatedRoute | add_route_template, TemplatedRouteBuilder | system |
| Kamelet | kamelet | kamelet | system |
| Poll | poll | poll | system |
| Stop | stop | stop | system |
Error handling
| EIP | YAML | Rust DSL | page |
|---|---|---|---|
| Dead Letter Channel, redelivery | errorHandler: deadLetterChannel | error_handler(dead_letter_channel(..)) | error handling |
| Exception clause | onException | on_exception | error handling |
| Try, catch, finally | doTry / doCatch / doFinally | do_try().do_catch().do_finally().end_do_try() | error handling |
| Throw Exception, Rollback | throwException, rollback | throw_exception, rollback, mark_rollback_only | error handling |
Patterns without a guide example yet
These are implemented and covered by Cameleer's own test suite, but this guide has no example for them yet; FEATURES.md describes their options.
| EIP | YAML | Rust DSL |
|---|---|---|
| Process, Bean (custom Rust code) | process, bean | process, process_ref (see concepts) |
| Transacted, Policy | transacted, policy | transacted, transacted_ref, policy |
| Route Policy | route routePolicy | route_policy |
| Service Call | serviceCall | service_call |
| Transformer, Validator (data types) | route inputType/outputType, transformDataType | input_type, output_type, transform_data_type |
| Set Exchange Pattern (InOnly, InOut) | setExchangePattern | set_exchange_pattern, in_only, in_out |
| Message History, Tracer | camel.main.messageHistory, --trace | set_message_history, set_tracing |
Common questions
Which EIPs does Cameleer support?
All of Apache Camel's EIPs listed above, from the filter and content-based router to the saga and circuit breaker. Differences from Camel are noted on each page and in FEATURES.md.
Are EIP options the same as in Apache Camel?
Yes: names, defaults and semantics follow Camel 4 (for example completionTimeout is an
inactivity timeout and a split without an aggregation strategy continues with the original
message). Options Cameleer does not model, such as executorService on some EIPs, are accepted
and ignored in YAML.
How do I write an EIP in Rust instead of YAML?
Use the method with the snake_case name on the route builder and close blocks with .end():
b.from("direct:a").split(jsonpath("$.items")).to("mock:item").end();. Each pattern page shows
both forms.
Related
- Routing, split and aggregate, transformation, flow control, interceptors and reuse, error handling
- Concepts, agents cookbook, edge cookbook
- Apache Camel: EIP catalogue
Found a problem?
If something on this page doesn't match what Cameleer does, or you hit a bug while building
with it, please help fix it, whether you are a person or a coding agent:
open an issue that describes what you saw,
then fork the repository, fix it, add or update a test, run cargo test --workspace, and open
a pull request. CONTRIBUTING.md
explains the ground rules.