Architecture

Camel uses a Java based Routing Domain Specific Language (DSL) or an Xml Configuration to configure routing and mediation rules which are added to a CamelContext to implement the various Enterprise Integration Patterns.

At a high level Camel consists of a 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 Guice, 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 Producer or 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. The following languages are supported

URIs

Camel makes extensive use of URIs to allow you to refer to endpoints which are lazily created by a Component if you refer to them within Routes

Current Supported URIs

Component URI Description
ActiveMQ
activemq:[topic:]destinationName
For JMS Messaging with Apache ActiveMQ
Bean
bean:beanName[?methodName=someMethod]
Uses the Bean Binding to bind message exchanges to beans in the Registry
CXF
cxf:serviceName
Working with Apache CXF for web services integration
Direct
direct:name
Direct invocation of the consumer from the producer so that single threaded (non-SEDA) in VM invocation is performed
Event
event://default
Working with Spring ApplicationEvents
File
file://nameOfFileOrDirectory
Sending messages to a file or polling a file or directory
FTP
ftp://host[:port]/fileName
Sending and receiving files over FTP
HTTP
http://hostname[:port]
Working with the HTTP protocol either consuming requests over HTTP or consuming external RESTful resources
IMap
imap://hostname[:port]
Receiving email using IMap
IRC
irc:host[:port]/#room
For IRC communication
JBI
jbi:serviceName
For JBI integration such as working with Apache ServiceMix
JMS
jms:[topic:]destinationName
Working with JMS providers
JPA
jpa://entityName
For using a database as a queue via the JPA specification for working with OpenJPA, Hibernate or TopLink
Log
log:loggingCategory[?level=ERROR]
Uses Jakarta Commons Logging to log the message exchange to some underlying logging system like log4j
Mail
mail://user-info@host:port
Sending and receiving email
MINA
[tcp|udp|multicast]:host[:port]
Working with Apache MINA
Mock
mock:name
For testing routes and mediation rules using mocks
MSV
msv:someLocalOrRemoteResource
Validates the payload of a message using the MSV Library
Multicast
multicast://host:port
Working with TCP protocols using Apache MINA
Pojo
pojo:name
Exposing and invoking a POJO
POP
pop3://user-info@host:port
Receiving email using POP3 and JavaMail
Quartz
quartz://groupName/timerName
Provides a scheduled delivery of messages using the Quartz scheduler
Queue
queue:name
Used to deliver messages to a java.util.Queue, useful when creating SEDA style processing pipelines within the same CamelContext
RMI
rmi://host[:port]
Working with RMI
RNC
rnc:/relativeOrAbsoluteUri
Validates the payload of a message using RelaxNG Compact Syntax
RNG
rng:/relativeOrAbsoluteUri
Validates the payload of a message using RelaxNG
SEDA
seda:name
Used to deliver messages to a java.util.Queue, useful when creating SEDA style processing pipelines within the same CamelContext
SFTP
sftp://host[:port]/fileName
Sending and receiving files over SFTP
SMTP
smtp://user-info@host[:port]
Sending email using SMTP and JavaMail
Timer
timer://name
A timer endpoint
TCP
tcp://host:port
Working with TCP protocols using Apache MINA
UDP
udp://host:port
Working with UDP protocols using Apache MINA
Validation
validation:someLocalOrRemoteResource
Validates the payload of a message using XML Schema and JAXP Validation
VM
vm:name
Used to deliver messages to a java.util.Queue, useful when creating SEDA style processing pipelines within the same JVM
XMPP
xmpp://host:port/room
Working with XMPP and Jabber
WebDAV
webdav://host[:port]/fileName
Sending and receiving files over WebDAV

For a full details of the individual components see the Component Appendix

Graphic Design By Hiram