LibraryLink ToToggle FramesPrintFeedback

What is Apache Camel?

Apache Camel is an open-source integration framework. It enables you to quickly define and implement routes — declarative solutions for specific integration problems. A route defines an integration path between two or more endpoints, a path from an input source to one or more output destinations. Each endpoint in a route, whether an input source or output destination, is identified by a URL. Apache Camel supports wide variety of endpoint types (and URLs).

You can deploy Apache Camel in a variety of environments, such as Tomcat, OSGi container, WebSphere, J2EE Server, and so on. Apache Camel works seamlessly with the following products:

You also can use Apache Camel on a standalone basis or in any Spring Framework-hosted application.

Routes enable you to implement enterprise integration patterns (EIPs) using plain old Java objects (POJOs). To learn more, read the authoritative book, Enterprise Integration Patterns, by Gregor Hohpe and Bobby Woolf. This book describes a number of design patterns for the use of enterprise application integration and message-oriented middleware. Also see Enterprise Integration Patterns and Apache Camel Enterprise Integration Patterns Guide.

Apache Camel provides two ways to define routes, which are functionally equivalent. The first way is by using the Java domain specific language (DSL). A DSL, also referred to as a fluent API, is a programming language designed for a specific kind of task. In this case, the task is implementing enterprise integration patterns.

One advantage of using a DSL is that Apache Camel can support type-safe smart completion of routing rules in your IDE using regular Java code without you having to use extensive XML configuration. If you change your DSL rules, you must recompile your Java sources.

The following example shows a DSL route that implements a Wire Tap pattern:

The second way you can define routes is using a Spring Framework XML configuration file. The advantage of using an XML file is that it changing a route requires no recompilation.

The following example shows an XML route that implements the same Wire Tap pattern as shown in the previous section: