Cameleer

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

EIPYAMLRust DSLpage
Pipeline, To, Dynamic To, Stepto, toD, stepto, to_d, steprouting
Message Filterfilterfilterrouting
Content-Based Routerchoice / when / otherwisechoice().when().otherwise().end()routing
Recipient ListrecipientListrecipient_listrouting
Routing SliproutingSliprouting_sliprouting
Dynamic RouterdynamicRouterdynamic_routerrouting
Multicastmulticastmulticastrouting
Wire TapwireTapwire_taprouting
Load Balancer (round robin, random, sticky, weighted, topic, failover, custom)loadBalanceload_balancerouting
Looplooploop_routing

Splitting, aggregating and ordering

EIPYAMLRust DSLpage
Splittersplitsplitsplit and aggregate
Composed Message Processor (split + aggregation strategy)split with aggregationStrategysplit(..).aggregation_strategy(..)split and aggregate
Aggregatoraggregateaggregatesplit and aggregate
Resequencer (batch, stream)resequenceresequencesplit and aggregate
Sortsortsortsplit and aggregate

Transformation

EIPYAMLRust DSLpage
Message TranslatorsetBody, transform, setHeader, removeHeadersset_body, transform, set_header, remove_headerstransformation
Marshal, Unmarshal (data formats)marshal, unmarshalmarshal, unmarshal, marshal_jsontransformation
Convert BodyconvertBodyToconvert_body_totransformation
Content Enricherenrichenrichtransformation
Poll EnrichpollEnrichpoll_enrichtransformation
Claim CheckclaimCheckclaim_checktransformation
Scriptscriptscript, process(cameleer_script::script(..))transformation

Flow control and resilience

EIPYAMLRust DSLpage
Idempotent ConsumeridempotentConsumeridempotent_consumerflow control
Throttlethrottlethrottleflow control
Delaydelaydelayflow control
Samplingsamplesample, sample_everyflow control
Circuit BreakercircuitBreaker / onFallbackcircuit_breaker().on_fallback()flow control
Validatevalidatevalidateflow control
Threadsthreadsthreads, threads_withflow control

Interceptors, completions and reuse

EIPYAMLRust DSLpage
Intercept Send To EndpointinterceptSendToEndpointintercept_send_to_endpointsystem
Intercept From, InterceptinterceptFrom, interceptintercept_from, interceptsystem
On CompletiononCompletionon_completionsystem
Sagasagasagasystem
Route TemplaterouteTemplate, templatedRouteadd_route_template, TemplatedRouteBuildersystem
Kameletkameletkameletsystem
Pollpollpollsystem
Stopstopstopsystem

Error handling

EIPYAMLRust DSLpage
Dead Letter Channel, redeliveryerrorHandler: deadLetterChannelerror_handler(dead_letter_channel(..))error handling
Exception clauseonExceptionon_exceptionerror handling
Try, catch, finallydoTry / doCatch / doFinallydo_try().do_catch().do_finally().end_do_try()error handling
Throw Exception, RollbackthrowException, rollbackthrow_exception, rollback, mark_rollback_onlyerror 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.

EIPYAMLRust DSL
Process, Bean (custom Rust code)process, beanprocess, process_ref (see concepts)
Transacted, Policytransacted, policytransacted, transacted_ref, policy
Route Policyroute routePolicyroute_policy
Service CallserviceCallservice_call
Transformer, Validator (data types)route inputType/outputType, transformDataTypeinput_type, output_type, transform_data_type
Set Exchange Pattern (InOnly, InOut)setExchangePatternset_exchange_pattern, in_only, in_out
Message History, Tracercamel.main.messageHistory, --traceset_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.

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.

Edit this page on GitHub