Apache Camel

Naming our routes

If we don’t specify a route id, a random value will be assigned.

https://camel.apache.org/manual/faq/how-do-i-name-my-routes.html

Camel Simple Expression Language

https://camel.apache.org/components/4.4.x/languages/simple-language.html

Enterprise integration patterns supported by Apache Camel

Camel supports most of the Enterprise Integration Patterns from the excellent book by Gregor Hohpe and Bobby Woolf.

https://camel.apache.org/components/4.4.x/eips/enterprise-integration-patterns.html

Some of the important ones are listed here

Pipeline

https://camel.apache.org/components/4.4.x/eips/pipeline-eip.html

Multicast

https://camel.apache.org/components/4.4.x/eips/multicast-eip.htmlo

Content based

https://camel.apache.org/components/4.4.x/eips/choice-eip.html

Split

https://camel.apache.org/components/4.4.x/eips/split-eip.html

Use cases:

  1. Split a file by lines, etc.
  2. comma delimiter

Aggregate

https://camel.apache.org/components/4.4.x/eips/aggregate-eip.html

Routing slip

Dynamic routing to various processing steps.

https://camel.apache.org/components/4.4.x/eips/routingSlip-eip.html

Dynamic Router

Allows you to route messages while avoiding the dependency of the router on all possible destinations

https://camel.apache.org/components/4.4.x/eips/dynamicRouter-eip.html

Best practices

Dynamic configuration - Use application.properties files

Put the names of the routes, etc. in the property files.

Standalone

Make sure camel context is running in standalone spring boot

https://camel.apache.org/camel-spring-boot/4.4.x/index.html#_making_sure_camel_context_is_running_in_standalone_spring_boot

Use Logging, Tracing and WireTaps

Use them for debugging issues, etc.

Use deadLetterQueue

Use them to make sure that no messages are lost in flight.

Secure messages with Encryption

Reading material

  1. https://camel.apache.org/camel-spring-boot/4.4.x/
  2. https://camel.apache.org/manual/spring.html
  3. https://camel.apache.org/manual/getting-started.html
  4. https://github.com/orgs/apache/repositories?q=camel-examples
  5. https://github.com/apache/camel-examples
  6. https://github.com/apache/camel-spring-boot-examples

Links to this note