LibraryLink ToToggle FramesPrintFeedback

Architecture

Figure 1.1 gives a general overview of the Apache Camel architecture; this architecture enables you to deploy across a wide variety of container types.


The router service is represented by a Camel context object, which encapsulates routing rules (in the form of RouteBuilder objects) and components (which enable the router to bind to various network protocols and other resources). The router application itself consists either of Java code or XML configuration, or possibly a combination of the two.

In general, an endpoint is a source or a sink of messages, identified by a URI. In practice, this means that an endpoint maps either to a network location or to some other resource that can produce or consume a stream of messages. Within a routing rule, endpoints are used in two distinct ways:

A component is a plug-in that integrates the router core with a particular network protocol or external resource. From the perspective of a router developer, a component appears to be a factory for creating a specific type of endpoint. For example, there is a file component that can be used to create endpoints that read/write messages to and from particular directories or files. There is a Apache CXF component that enables you to create endpoints that communicate with Web services (and related protocols).

Typically, before you can use a particular component, you must configure it and add it to the Camel context. You do not have to do this for the following components, which are embedded in the router core:

For more details about the available components see the Deployment Guide and the list of Camel components.

The RouteBuilder classes encapsulate the routing rules. A router developer defines custom classes that inherit from RouteBuilder and adds instances of these classes to the CamelContext.

The router architecture supports these deployment options:

For more details about the deployment options, see the Deployment Guide.

A CamelContext represents a single Camel routing rulebase. It defines the context used to configure routes and details which policies should be used during message exchanges between endpoints.