Figure 1.1 shows an overview of the architecture for a router deployed in standalone mode.
The CamelContext represents the router service itself. In contrast to most container deployment modes (where the CamelContext instance is normally hidden), the standalone deployment requires you to explicitly create and initialize the CamelContext in your application code. As part of the initialization procedure, you explicitly create components and route builders and add them to the CamelContext.
Components represent connections to particular kinds of destination—for example, a file system, a Web service, a JMS broker, or a CORBA service. In order to read and write messages to and from various destinations, you must configure and register components by adding them to the CamelContext.
The RouteBuilder
classes represent the core of a router application, because they define the routing
rules. In a standalone deployment, the developer is responsible for managing the lifecycle of RouteBuilder
objects.
In particular, the developer must create instances of the RouteBuilder
objects and register them by
adding them to the CamelContext.