Search Tutorials


Apache Camel Tutorials | JavaInUse

Apache Camel


In an enterprise, a number of systems of different types exist. Some of these may be legacy systems while some may be new. These systems often interact with each other,and need to be integrated. This interaction or integration is not easy as the implementations of the systems, their message formats may differ. One way to achieve this is to implement code which bridges these differences. However this will be point to point integration. If tomorrow again if there is change in a system the other might also have to be changed which is not good. Instead of this point to point integration which causes tight coupling we can implement an additional layer to mediate the differences between the systems. This results in loose coupling and not affect much our existing systems. Apache Camel is a rule-based routing and mediation engine that provides a Java object-based implementation of the Enterprise Integration Patterns using an API (or declarative Java Domain Specific Language) to configure routing and mediation rules.

Features of Apache Camel
  • Apache camel is a light weight framework. It can be deployed on a variety of containers like Tomcat, esbs etc.
  • Apache camel provides us with a number of components. These components make interacting create endpoints with which a system can interact with other external systems. For example using an ActiveMQ component we expose an ActiveMQ endpoint for interaction with external system. There are more than 100 components provided by Apache Camel. Some of them are FTP,JMX, Webservices, HTTP. Apache camel also allows users to create custom components.
  • Apache camel uses Message Exchange Patterns(MEP). Apache camel exchange can hold any kind of message. It supports a variety of formats like xml, JSON etc.
  • Camel provides many different type converters for marshaling and unmarshalling the message during routing. Routes in a variety of domain-specific languages (DSL).The most popular ones are
    1. Java DSL - A Java based DSL using the fluent builder style.
    2. Spring XML - A XML based DSL in Spring XML files
    When using Spring XML we can make use of Spring support for
    features like Transaction Management, JPA etc.

Apache Camel Tutorial

In this tutorial we implement Apache camel examples. Some are standalone and some require deployment on JBOSS Fuse ESB.

Apache Camel Tutorial

StandAlone Apache Camel Examples


Apache Camel JBoss Fuse Examples


Interview Questions