Apache Camel is an open source framework that provides rule-based routing and mediation engine. Apache Camel essentially provides an implementation of various EIPs. It makes integration easier by providing connectivity to a very large variety of transports and APIs.
2. Lack of etiquette and manners is a huge turn off.
KnolX Etiquettes
Punctuality
Respect Knolx session timings,
you are requested not to join
sessions after a 5 minutes
threshold post the session start
time.
Feedback
Make sure to submit a
constructive feedback for all
sessions as it is very helpful for
the presenter.
Silent Mode
Please keep your screen on
mute, until it's necessary
Avoid Distraction
Be along with the presenter
during the session and enjoy.
3. Agenda
● Enterprise Integration are complex
● Why Apache Camel
● Introduction
● Features of Apache Camel
● Architecture
● How it works
● Components
4. 1. Enterprises have hundred of application :
★ complex communication pattern
★ variety of transport as HTTP , Queue etc
★ variety of protocol as HTTP ,JMS, AMQP
2. Evolution of cloud and microservices makes enterprise integration even more
complex
3. How can we simplify enterprise integration
★ Follow enterprise integration pattern
4. How to implement enterprise integration
pattern
★ Use Apache Camel
Enterprise Integrations are Complex
5. Integration Can Be messy - variety of protocols and
data formats
Framework hides all complexity so you can focus on
business logics
Camel is really simple to use and is very power full it
has tons of component as bean,browse,control bus
etc.
Has great spring and bean integration as @produce
, @consume,@beanInject etc.
Why Apache Camel
6. 1. Open Source Enterprise Integration Framework.
● Easily integrate system consuming or producing data
2. Inspired by “Enterprise Integration Patterns” - Gregor hohpe and Bobby
Woolf
● Evolve to Microservices Architecture and cloud
3. Lean-Lightweight and Extensible
● Component architecture Keeps footprint low
● Provides 100+ Component for databases , message Queue ,
● APIs , Cloud integration etc
● Supports 200+ protocols , transport and data formats (& 300+ converters)
● Provides Domains Specific Language (DSL) customized to suit needs of application
integration
Apache Camel
7. Features
Camel makes the integration easier by providing connectivity to a very large variety of transports and
APIs. For example, you can easily route JMS to JSON, JSON to JMS, HTTP to JMS, FTP to JMS, even HTTP to
HTTP, and connectivity to Microservices. You simply need to provide appropriate endpoints at both
ends. Camel is extensible and thus in future more endpoints can be added easily to the framework.
● Camel supports pluggable data formats and type converters for such message
transformations, so new formats and converters can be added in future. Currently, it
supports several popular formats and converters; to name a few - CSV, EDI, JAXB, JSON,
XmlBeans, XStream, Flatpack, Zip.
● Camel supports pluggable languages to write predicates in DSL. Some of the supported
languages include JavaScript, Groovy, Python, PHP, Ruby, SQL, XPath, XQuery.
● Camel supports the POJO model so that you can plug in Javabeans at various points.
9. Work with Apache Camel Using its processor
Camel is a box that receives messages from some endpoint and sends it to another one.
Within the box, the messages may be processed or simply redirected.
10. How it works
Camel Core
Contains all the functionality needed to run a Camel application - DSL for various language ,
the routing engine , implementation of EIPs , a number of data converters , and core
Components
Camel Routers
A routers represents a chain of processing steps applier to a message based on some rules .
The routes has beginning defined by the from endpoint , and one or more processing steps
commonly called "Processors"
Camel Context
A dynamically multithreaded router container , responsible for managing all aspects of the
routing : route lifecycle , message conversions ,
configurations , error handling , monitoring and so on .
11. Message
A message in Apache Camel is an implementation of org.apache.camel Message interface
Message has four main parts
● UID
● Header
● Body
● Attachments
End Points
any producer or consumer in Camel route is an Endpoint Consider Camel route as a graph and Endpoint
as a Node.
Exchange
A Message Container and Link between producer and consumer endpoints and hold information about
● producer and consumer endpoints
● message route
● protocol used
● any error or exception throw
12. Camel routes starts with "from" that act as a consumer . consumer can of the following types :
● Polling consumer (fetches message periodically)
● Event-Driven consumer (listens for events)
Consumer receive a message from external system
Consumer wraps the message in a Camel specific formats called Exchange and Starts routing
between endpoints .
Producer are identical by the keyword "to" , Once message received producer will:
● Converting exchanges
● Delivering them to other channels
Camel Message Routing