[[Architecture-Architecture]]
= Architecture

Camel uses a Java based xref:dsl.adoc[Routing Domain Specific Language (DSL)] 
or an XML Configuration to configure
routing and mediation rules which are added to a
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/CamelContext.html[CamelContext]
to implement the various
xref:{eip-vc}:eips:enterprise-integration-patterns.adoc[Enterprise Integration Patterns].

At a high level Camel consists of a
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/CamelContext.html[CamelContext]
which contains a collection of Component instances.
A Component is essentially a factory of
Endpoint instances. You can explicitly configure
Component instances in Java code or an IoC
container like Spring, or they can be auto-discovered using
URIs.

An Endpoint acts rather like a URI or URL in a web
application or a Destination in a JMS system; you can communicate with
an endpoint; either sending messages to it or consuming messages from
it. You can then create a
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Producer.html[Producer]
or
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Consumer.html[Consumer]
on an Endpoint to exchange messages with it.

The DSL makes heavy use of pluggable
Languages to create an
Expression or Predicate to
make a truly powerful DSL which is extensible to the most suitable
language depending on your needs. Many of the Languages 
are also supported as
xref:parameter-binding-annotations.adoc[Annotation Based Expression Language].

[[Architecture-Diagram]]
== Diagram

image::camel-components.png[image]
