SlideShare a Scribd company logo
Getting started with
Apache Camel
Claus Ibsen
@davsclaus
2
Agenda
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● What's not in the Camel box?
● More Information
3
Your Speaker
● Principal Software Engineer at Red Hat
● Apache Camel
● 6 years as committer
● Author of Camel in Action book
● Contact
● EMail: cibsen@redhat.com
● Twitter: @davsclaus
● Blog: http://davsclaus.com
● Linkedin: http://www.linkedin.com/in/davsclaus
4
My Camel Story
● Starts 7 years ago
● Consultant working for Silverbullet
● POC in 2007/2008
● Looking for
● open source
● Integration framework
● As replacement for aging Integration Platform
● Apache Camel was one of the candidates
5
My Camel Story
● Apache Camel 1.2 had missing parts
● .. so I had to add those missing parts
6
My Camel Story
● .. to turn Camel into the lovely Camel
it could be back.
●
It was a success as our 1st
Apache Camel 1.x
integration went into production end of 2008.
7
Agenda
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● What's not in the Camel box?
● More Information
8
What is Apache Camel?
● Quote from the website
9
What is Apache Camel?
● Why do we need integration?
● Critical for your business to integrate
● Why Integration Framework?
● Framework do the heavy lifting
● You can focus on business problem
● Not "reinventing the wheel"
10
What is Apache Camel?
● What is Enterprise Integration Patterns?
It's a book
11
What is Apache Camel?
● Enterprise Integration Patterns
http://camel.apache.org/eip
12
What is Apache Camel?
● EIP - Content Based Router
13
What is Apache Camel?
from newOrder
14
What is Apache Camel?
from newOrder
choice
15
What is Apache Camel?
from newOrder
choice
when isWidget to widget
16
What is Apache Camel?
from newOrder
choice
when isWidget to widget
otherwise to gadget
17
What is Apache Camel?
from(newOrder)
choice
when(isWidget) to(widget)
otherwise to(gadget)
18
What is Apache Camel?
from(newOrder)
.choice()
.when(isWidget).to(widget)
.otherwise().to(gadget);
19
What is Apache Camel?
Endpoint newOrder = endpoint("activemq:queue:newOrder");
from(newOrder)
.choice()
.when(isWidget).to(widget)
.otherwise().to(gadget);
20
What is Apache Camel?
Endpoint newOrder = endpoint("activemq:queue:newOrder");
Predicate isWidget = xpath("/order/product = 'widget'");
from(newOrder)
.choice()
.when(isWidget).to(widget)
.otherwise().to(gadget);
21
What is Apache Camel?
Endpoint newOrder = endpoint("activemq:queue:newOrder");
Predicate isWidget = xpath("/order/product = 'widget'");
Endpoint widget = endpoint("activemq:queue:widget");
Endpoint gadget = endpoint("activemq:queue:gadget");
from(newOrder)
.choice()
.when(isWidget).to(widget)
.otherwise().to(gadget);
22
What is Apache Camel?
● Java Code
public void configure() throws Exception {
Endpoint newOrder = endpoint("activemq:queue:newOrder");
Predicate isWidget = xpath("/order/product = 'widget'");
Endpoint widget = endpoint("activemq:queue:widget");
Endpoint gadget = endpoint("activemq:queue:gadget");
from(newOrder)
.choice()
.when(isWidget).to(widget)
.otherwise().to(gadget)
.end();
}
23
What is Apache Camel?
● Java Code
import org.apache.camel.Endpoint;
import org.apache.camel.Predicate;
import org.apache.camel.builder.RouteBuilder;
public class MyRoute extends RouteBuilder {
public void configure() throws Exception {
Endpoint newOrder = endpoint("activemq:queue:newOrder");
Predicate isWidget = xpath("/order/product = 'widget'");
Endpoint widget = endpoint("activemq:queue:widget");
Endpoint gadget = endpoint("activemq:queue:gadget");
from(newOrder)
.choice()
.when(isWidget).to(widget)
.otherwise().to(gadget)
.end();
}
}
24
What is Apache Camel?
● Camel Java DSL
import org.apache.camel.builder.RouteBuilder;
public class MyRoute extends RouteBuilder {
public void configure() throws Exception {
from("activemq:queue:newOrder")
.choice()
.when(xpath("/order/product = 'widget'"))
.to("activemq:queue:widget")
.otherwise()
.to("activemq:queue:gadget")
.end();
}
}
25
What is Apache Camel?
● Camel XML DSL
<route>
<from uri="activemq:queue:newOrder"/>
<choice>
<when>
<xpath>/order/product = 'widget'</xpath>
<to uri="activemq:queue:widget"/>
</when>
<otherwise>
<to uri="activemq:queue:gadget"/>
</otherwise>
</choice>
</route>
26
What is Apache Camel?
● Endpoint as URIs
<route>
<from uri="file:inbox/orders"/>
<choice>
<when>
<xpath>/order/product = 'widget'</xpath>
<to uri="activemq:queue:widget"/>
</when>
<otherwise>
<to uri="activemq:queue:gadget"/>
</otherwise>
</choice>
</route>
use file instead
27
What is Apache Camel?
● Endpoint as URIs
<route>
<from uri="file:inbox/orders?delete=true"/>
<choice>
<when>
<xpath>/order/product = 'widget'</xpath>
<to uri="activemq:queue:widget"/>
</when>
<otherwise>
<to uri="activemq:queue:gadget"/>
</otherwise>
</choice>
</route>
parameters
28
Standard Java or XML
● Java DSL is just Java
29
Standard Java or XML
● XML DSL is just XML
● 
 with XSD schema for validation/tooling
30
What is Apache Camel?
● Camel's Architecture
31
What is Apache Camel?
150+ Components
32
What is Apache Camel?
150+ Components
33
What is Apache Camel?
● Summary
● Integration Framework
● Enterprise Integration Patterns (EIP)
● Routing (using DSL)
● Easy Configuration (endpoint as uri's)
● Just Java or XML code
● No Container Dependency
● A lot of components
34
Agenda
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● What's not in the Camel box?
● More Information
35
A Little Example
● File Copier Example
36
A Little Example
● File Copier Example
37
A Little Example
● File Copier Example
38
A Little Example
● File Copier Example
39
A Little Example
● File Copier Example
40
Agenda
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● What's not in the Camel box?
● More Information
41
Riding Camel
● Downloading Apache Camel
● zip/tarball (approx 8mb)
http://camel.apache.org
42
Riding Camel
● Using Command Shell
● Requires: Apache Maven
● From Eclipse
43
Riding Camel
● Console Example
● cd examples/camel-example-console
● mvn compile exec:java
44
Riding Camel
● Twitter Example
● cd examples/camel-example-twitter-websocket
● mvn compile exec:java http://localhost:9090/index.html
45
Riding Camel
● More examples ...
... and further details at website.
http://camel.apache.org/examples
46
Agenda
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the box?
● Deploying Camel
● Creating new Camel Projects
● What's not in the Camel box?
● More Information
47
What's in the box?
48
What's in the box?
● Enterprise Integration Patterns
http://camel.apache.org/eip
49
What's in the box?
● Splitter EIP
50
What's in the box?
150+ Components
51
What's in the box?
19 Data Formats
52
What's in the box?
15 Expression Languages
53
What's in the box?
4 DSL in multiple languages
● Java DSL
● XML DSL (Spring and OSGi Blueprint)
● Groovy DSL
● Scala DSL
54
What's in the box?
Test Kit
● camel-test camel-test-spring
● camel-test-blueprint camel-testng
55
What's in the box?
Management
● JMX
● REST (w/ Jolokia)
56
Agenda
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● What's not in the Camel box?
● More Information
57
Deploying Camel
● Deployment Strategy
● No Container Dependency
● Lightweight & Embeddable
● Deployment Options
● Standalone
● WAR
● Spring
● JEE
● OSGi
● Cloud
Known Containers
Apache ActiveMQ
Apache Karaf
Apache ServiceMix
Apache Tomcat
Fabric8
Glassfish
JBoss AS / Wildfly
JBoss Fuse
JBoss Fuse Service Works
Jetty
WebLogic
WebSphere
Known Clouds
Amazon EC2
Google App Engine
OpenStack
OpenShift

 and many more
58
Camel as a Client
● Java Client Application (no routes)
● Example
● Upload a file to a FTP server
59
Agenda
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● What's not in the Camel box?
● More Information
60
Creating new Camel Projects
● Using Command Shell
● .. or from Eclipse
61
Creating new Camel Projects
● Importing into Eclipse
Existing Maven Project
62
Creating new Camel Projects
● Maven Archetypes
camel-archetype-activemq camel-archetype-java
camel-archetype-blueprint camel-archetype-scala
camel-archetype-component camel-archetype-spring
camel-archetype-dataformat camel-archetype-spring-dm
camel-archetype-groovy camel-archetype-web
63
Creating new Camel Projects
● camel-archetype-spring
mvn install
mvn camel:run
mvn io.hawt:hawtio-maven-plugin:1.3.1:spring
64
Agenda
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● What's not in the Camel box?
● More Information
65
What's not in the Camel box?
●
3rd
party Apache Camel software
● Commercial Support
● http://camel.apache.org/commercial-camel-offerings.html
● User Stories
● http://camel.apache.org/user-stories.html
● External Components
● http://camel.apache.org/components.html (bottom)
● Apache Camel Extra
● https://code.google.com/a/apache-extras.org/p/camel-extra
66
What's not in the Camel box?
Tooling – Eclipse Plugin – Fuse IDE
Free community and Red Hat supported versions at:
http://tools.jboss.org/downloads/
67
What's not in the Camel box?
Tooling – Web Console - hawtio
http://hawt.io
68
What's not in the Camel box?
● Integration Platform - fabric8
http://fabric8.io
69
Agenda
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● What's not in the Camel box?
● More Information
70
Where do I get more information?
● Best Article covering what Apache Camel is
● http://java.dzone.com/articles/open-source-integration-
apache
Link to article from “Getting Started”
71
Where do I get more information?
● Try Camel Examples
● http://camel.apache.org/examples.html
● Read other blogs and articles
● http://camel.apache.org/articles.html
● Use the “search box” on the Camel front page
72
Where do I get more information?
● Use the mailing list / forum
● http://camel.apache.org/mailing-lists.html
● Use stackoverflow
● http://stackoverflow.com/questions/tagged/apache-camel
● Use IRC chat
● http://camel.apache.org/irc-room.html
73
Where do I get more information?
● Buy the Camel in Action book
http://manning.com/ibsen/
Use code ...
camel40

 for 40% discount
74
Where do I get more information?
● .. and/or any of the other Camel books in the market
http://camel.apache.org/books
75
Any Questions ?
● Contact
● EMail: cibsen@redhat.com / claus.ibsen@gmail.com
● Twitter: @davsclaus
● Blog: http://davsclaus.com
● Linkedin: http://www.linkedin.com/in/davsclaus

More Related Content

ODP
Integration using Apache Camel and Groovy
PDF
Apache Camel - The integration library
ODP
Using Apache Camel connectors for external connectivity
ODP
Microservices with apache_camel_barcelona
ODP
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
PDF
Getting started with Apache Camel - jDays 2013
ODP
Getting started with Apache Camel - May 2013
ODP
Getting Started with Apache Camel - Devconf Conference - February 2013
Integration using Apache Camel and Groovy
Apache Camel - The integration library
Using Apache Camel connectors for external connectivity
Microservices with apache_camel_barcelona
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Getting started with Apache Camel - jDays 2013
Getting started with Apache Camel - May 2013
Getting Started with Apache Camel - Devconf Conference - February 2013

What's hot (20)

ODP
Microservices with Apache Camel
ODP
Getting started with Apache Camel - Javagruppen Copenhagen - April 2014
PPTX
Introduction to Apache Camel
PPTX
ApacheCon EU 2016 - Apache Camel the integration library
PPT
Integration made easy with Apache Camel
PDF
Camel Day Italy 2021 - What's new in Camel 3
ODP
Apache Camel workshop at BarcelonaJUG in January 2014
PDF
Enterprise Integration Patterns with Apache Camel
PPTX
Apache Camel K - Copenhagen v2
PDF
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
ODP
Getting Started with Apache Camel - Malmo JUG - March 2013
PDF
Integrating systems in the age of Quarkus and Camel
PPTX
Apache Camel K - Fredericia
PDF
Taking Apache Camel For A Ride
PPTX
Integrating microservices with apache camel on kubernetes
PDF
Event Driven Architecture with Apache Camel
PDF
Apache Camel - FUSE community day London 2010 presentation
PDF
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
PDF
Apache Camel v3, Camel K and Camel Quarkus
PDF
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
Microservices with Apache Camel
Getting started with Apache Camel - Javagruppen Copenhagen - April 2014
Introduction to Apache Camel
ApacheCon EU 2016 - Apache Camel the integration library
Integration made easy with Apache Camel
Camel Day Italy 2021 - What's new in Camel 3
Apache Camel workshop at BarcelonaJUG in January 2014
Enterprise Integration Patterns with Apache Camel
Apache Camel K - Copenhagen v2
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Getting Started with Apache Camel - Malmo JUG - March 2013
Integrating systems in the age of Quarkus and Camel
Apache Camel K - Fredericia
Taking Apache Camel For A Ride
Integrating microservices with apache camel on kubernetes
Event Driven Architecture with Apache Camel
Apache Camel - FUSE community day London 2010 presentation
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
Apache Camel v3, Camel K and Camel Quarkus
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
Ad

Viewers also liked (20)

ODP
Developing Microservices with Apache Camel
ODP
Apache ActiveMQ and Apache Camel
 
PPTX
Infrastructure as Code
PDF
Messaging With ActiveMQ
PDF
Microservices with Apache Camel, DDD, and Kubernetes
PDF
Developing real-time data pipelines with Spring and Kafka
PDF
Managing your camels in the cloud with CI/CD
PDF
Microservices and APIs
PDF
Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3
PDF
SOA to Microservices
PDF
Global Netflix Platform
PDF
Reactive dashboard’s using apache spark
PDF
Data processing platforms architectures with Spark, Mesos, Akka, Cassandra an...
PDF
Microservices Journey NYC
PDF
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
PDF
Apache Camel in the belly of the Docker whale
PDF
Open source IoT gateway
PPTX
The hardest part of microservices: your data
PPTX
A Microservice Journey
PPTX
Apache camel et les entreprise integration patterns
Developing Microservices with Apache Camel
Apache ActiveMQ and Apache Camel
 
Infrastructure as Code
Messaging With ActiveMQ
Microservices with Apache Camel, DDD, and Kubernetes
Developing real-time data pipelines with Spring and Kafka
Managing your camels in the cloud with CI/CD
Microservices and APIs
Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3
SOA to Microservices
Global Netflix Platform
Reactive dashboard’s using apache spark
Data processing platforms architectures with Spark, Mesos, Akka, Cassandra an...
Microservices Journey NYC
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Apache Camel in the belly of the Docker whale
Open source IoT gateway
The hardest part of microservices: your data
A Microservice Journey
Apache camel et les entreprise integration patterns
Ad

Similar to Getting Started with Apache Camel at DevNation 2014 (20)

PDF
Integration using Apache Camel and Groovy
PDF
Fabric8 - Being devOps doesn't suck anymore
PDF
Tomcat from a cluster to the cloud on RP3
PDF
Low Code Integration with Apache Camel.pdf
PDF
State of Big Data on ARM64 / AArch64 - Apache Bigtop
PDF
Cloud Native Camel Design Patterns
PDF
State of integration with Apache Camel (ApacheCon 2019)
PDF
Short journey into the serverless world
PDF
DCSF19 Docker Containers & Java: What I Wish I Had Been Told
PDF
BBC's GraphDB (formerly Owlim) AWS Cloud Migration
PDF
Camel JBang - Quarkus Insights.pdf
PPTX
Apache Camel K - Copenhagen
PDF
apachecamelk-april2019-190409093034.pdf
PDF
Kubecon seattle 2018 workshop slides
PDF
CamundaCon 2018: Using Zeebe with Spring Boot and Apache Camel (Holisticon)
PDF
Who needs containers in a serverless world
PDF
Get your teeth into Plack
PDF
Dockerize All The Things
PPTX
Managing and Scaling Puppet - PuppetConf 2014
PDF
ContainerCon - Test Driven Infrastructure
Integration using Apache Camel and Groovy
Fabric8 - Being devOps doesn't suck anymore
Tomcat from a cluster to the cloud on RP3
Low Code Integration with Apache Camel.pdf
State of Big Data on ARM64 / AArch64 - Apache Bigtop
Cloud Native Camel Design Patterns
State of integration with Apache Camel (ApacheCon 2019)
Short journey into the serverless world
DCSF19 Docker Containers & Java: What I Wish I Had Been Told
BBC's GraphDB (formerly Owlim) AWS Cloud Migration
Camel JBang - Quarkus Insights.pdf
Apache Camel K - Copenhagen
apachecamelk-april2019-190409093034.pdf
Kubecon seattle 2018 workshop slides
CamundaCon 2018: Using Zeebe with Spring Boot and Apache Camel (Holisticon)
Who needs containers in a serverless world
Get your teeth into Plack
Dockerize All The Things
Managing and Scaling Puppet - PuppetConf 2014
ContainerCon - Test Driven Infrastructure

More from Claus Ibsen (11)

PDF
DevNation Live 2020 - What's new with Apache Camel 3
PDF
Best Practices for Middleware and Integration Architecture Modernization with...
PDF
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
PPTX
Serverless integration with Knative and Apache Camel on Kubernetes
PDF
JEEConf 2018 - Camel microservices with Spring Boot and Kubernetes
PPTX
Camel riders in the cloud
PDF
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
PDF
Developing Java based microservices ready for the world of containers
PDF
Developing Java based microservices ready for the world of containers
PDF
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
PDF
Apache Camel Introduction & What's in the box
DevNation Live 2020 - What's new with Apache Camel 3
Best Practices for Middleware and Integration Architecture Modernization with...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Serverless integration with Knative and Apache Camel on Kubernetes
JEEConf 2018 - Camel microservices with Spring Boot and Kubernetes
Camel riders in the cloud
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containers
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Apache Camel Introduction & What's in the box

Recently uploaded (20)

PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Introduction to Artificial Intelligence
PDF
Digital Strategies for Manufacturing Companies
PPTX
ai tools demonstartion for schools and inter college
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
medical staffing services at VALiNTRY
PDF
Nekopoi APK 2025 free lastest update
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
Navsoft: AI-Powered Business Solutions & Custom Software Development
Wondershare Filmora 15 Crack With Activation Key [2025
Odoo Companies in India – Driving Business Transformation.pdf
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Online Work Permit System for Fast Permit Processing
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Introduction to Artificial Intelligence
Digital Strategies for Manufacturing Companies
ai tools demonstartion for schools and inter college
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
medical staffing services at VALiNTRY
Nekopoi APK 2025 free lastest update
CHAPTER 2 - PM Management and IT Context
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Odoo POS Development Services by CandidRoot Solutions
2025 Textile ERP Trends: SAP, Odoo & Oracle
Upgrade and Innovation Strategies for SAP ERP Customers

Getting Started with Apache Camel at DevNation 2014

  • 1. Getting started with Apache Camel Claus Ibsen @davsclaus
  • 2. 2 Agenda ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● What's not in the Camel box? ● More Information
  • 3. 3 Your Speaker ● Principal Software Engineer at Red Hat ● Apache Camel ● 6 years as committer ● Author of Camel in Action book ● Contact ● EMail: cibsen@redhat.com ● Twitter: @davsclaus ● Blog: http://davsclaus.com ● Linkedin: http://www.linkedin.com/in/davsclaus
  • 4. 4 My Camel Story ● Starts 7 years ago ● Consultant working for Silverbullet ● POC in 2007/2008 ● Looking for ● open source ● Integration framework ● As replacement for aging Integration Platform ● Apache Camel was one of the candidates
  • 5. 5 My Camel Story ● Apache Camel 1.2 had missing parts ● .. so I had to add those missing parts
  • 6. 6 My Camel Story ● .. to turn Camel into the lovely Camel it could be back. ● It was a success as our 1st Apache Camel 1.x integration went into production end of 2008.
  • 7. 7 Agenda ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● What's not in the Camel box? ● More Information
  • 8. 8 What is Apache Camel? ● Quote from the website
  • 9. 9 What is Apache Camel? ● Why do we need integration? ● Critical for your business to integrate ● Why Integration Framework? ● Framework do the heavy lifting ● You can focus on business problem ● Not "reinventing the wheel"
  • 10. 10 What is Apache Camel? ● What is Enterprise Integration Patterns? It's a book
  • 11. 11 What is Apache Camel? ● Enterprise Integration Patterns http://camel.apache.org/eip
  • 12. 12 What is Apache Camel? ● EIP - Content Based Router
  • 13. 13 What is Apache Camel? from newOrder
  • 14. 14 What is Apache Camel? from newOrder choice
  • 15. 15 What is Apache Camel? from newOrder choice when isWidget to widget
  • 16. 16 What is Apache Camel? from newOrder choice when isWidget to widget otherwise to gadget
  • 17. 17 What is Apache Camel? from(newOrder) choice when(isWidget) to(widget) otherwise to(gadget)
  • 18. 18 What is Apache Camel? from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget);
  • 19. 19 What is Apache Camel? Endpoint newOrder = endpoint("activemq:queue:newOrder"); from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget);
  • 20. 20 What is Apache Camel? Endpoint newOrder = endpoint("activemq:queue:newOrder"); Predicate isWidget = xpath("/order/product = 'widget'"); from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget);
  • 21. 21 What is Apache Camel? Endpoint newOrder = endpoint("activemq:queue:newOrder"); Predicate isWidget = xpath("/order/product = 'widget'"); Endpoint widget = endpoint("activemq:queue:widget"); Endpoint gadget = endpoint("activemq:queue:gadget"); from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget);
  • 22. 22 What is Apache Camel? ● Java Code public void configure() throws Exception { Endpoint newOrder = endpoint("activemq:queue:newOrder"); Predicate isWidget = xpath("/order/product = 'widget'"); Endpoint widget = endpoint("activemq:queue:widget"); Endpoint gadget = endpoint("activemq:queue:gadget"); from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget) .end(); }
  • 23. 23 What is Apache Camel? ● Java Code import org.apache.camel.Endpoint; import org.apache.camel.Predicate; import org.apache.camel.builder.RouteBuilder; public class MyRoute extends RouteBuilder { public void configure() throws Exception { Endpoint newOrder = endpoint("activemq:queue:newOrder"); Predicate isWidget = xpath("/order/product = 'widget'"); Endpoint widget = endpoint("activemq:queue:widget"); Endpoint gadget = endpoint("activemq:queue:gadget"); from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget) .end(); } }
  • 24. 24 What is Apache Camel? ● Camel Java DSL import org.apache.camel.builder.RouteBuilder; public class MyRoute extends RouteBuilder { public void configure() throws Exception { from("activemq:queue:newOrder") .choice() .when(xpath("/order/product = 'widget'")) .to("activemq:queue:widget") .otherwise() .to("activemq:queue:gadget") .end(); } }
  • 25. 25 What is Apache Camel? ● Camel XML DSL <route> <from uri="activemq:queue:newOrder"/> <choice> <when> <xpath>/order/product = 'widget'</xpath> <to uri="activemq:queue:widget"/> </when> <otherwise> <to uri="activemq:queue:gadget"/> </otherwise> </choice> </route>
  • 26. 26 What is Apache Camel? ● Endpoint as URIs <route> <from uri="file:inbox/orders"/> <choice> <when> <xpath>/order/product = 'widget'</xpath> <to uri="activemq:queue:widget"/> </when> <otherwise> <to uri="activemq:queue:gadget"/> </otherwise> </choice> </route> use file instead
  • 27. 27 What is Apache Camel? ● Endpoint as URIs <route> <from uri="file:inbox/orders?delete=true"/> <choice> <when> <xpath>/order/product = 'widget'</xpath> <to uri="activemq:queue:widget"/> </when> <otherwise> <to uri="activemq:queue:gadget"/> </otherwise> </choice> </route> parameters
  • 28. 28 Standard Java or XML ● Java DSL is just Java
  • 29. 29 Standard Java or XML ● XML DSL is just XML ● 
 with XSD schema for validation/tooling
  • 30. 30 What is Apache Camel? ● Camel's Architecture
  • 31. 31 What is Apache Camel? 150+ Components
  • 32. 32 What is Apache Camel? 150+ Components
  • 33. 33 What is Apache Camel? ● Summary ● Integration Framework ● Enterprise Integration Patterns (EIP) ● Routing (using DSL) ● Easy Configuration (endpoint as uri's) ● Just Java or XML code ● No Container Dependency ● A lot of components
  • 34. 34 Agenda ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● What's not in the Camel box? ● More Information
  • 35. 35 A Little Example ● File Copier Example
  • 36. 36 A Little Example ● File Copier Example
  • 37. 37 A Little Example ● File Copier Example
  • 38. 38 A Little Example ● File Copier Example
  • 39. 39 A Little Example ● File Copier Example
  • 40. 40 Agenda ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● What's not in the Camel box? ● More Information
  • 41. 41 Riding Camel ● Downloading Apache Camel ● zip/tarball (approx 8mb) http://camel.apache.org
  • 42. 42 Riding Camel ● Using Command Shell ● Requires: Apache Maven ● From Eclipse
  • 43. 43 Riding Camel ● Console Example ● cd examples/camel-example-console ● mvn compile exec:java
  • 44. 44 Riding Camel ● Twitter Example ● cd examples/camel-example-twitter-websocket ● mvn compile exec:java http://localhost:9090/index.html
  • 45. 45 Riding Camel ● More examples ... ... and further details at website. http://camel.apache.org/examples
  • 46. 46 Agenda ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the box? ● Deploying Camel ● Creating new Camel Projects ● What's not in the Camel box? ● More Information
  • 48. 48 What's in the box? ● Enterprise Integration Patterns http://camel.apache.org/eip
  • 49. 49 What's in the box? ● Splitter EIP
  • 50. 50 What's in the box? 150+ Components
  • 51. 51 What's in the box? 19 Data Formats
  • 52. 52 What's in the box? 15 Expression Languages
  • 53. 53 What's in the box? 4 DSL in multiple languages ● Java DSL ● XML DSL (Spring and OSGi Blueprint) ● Groovy DSL ● Scala DSL
  • 54. 54 What's in the box? Test Kit ● camel-test camel-test-spring ● camel-test-blueprint camel-testng
  • 55. 55 What's in the box? Management ● JMX ● REST (w/ Jolokia)
  • 56. 56 Agenda ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● What's not in the Camel box? ● More Information
  • 57. 57 Deploying Camel ● Deployment Strategy ● No Container Dependency ● Lightweight & Embeddable ● Deployment Options ● Standalone ● WAR ● Spring ● JEE ● OSGi ● Cloud Known Containers Apache ActiveMQ Apache Karaf Apache ServiceMix Apache Tomcat Fabric8 Glassfish JBoss AS / Wildfly JBoss Fuse JBoss Fuse Service Works Jetty WebLogic WebSphere Known Clouds Amazon EC2 Google App Engine OpenStack OpenShift 
 and many more
  • 58. 58 Camel as a Client ● Java Client Application (no routes) ● Example ● Upload a file to a FTP server
  • 59. 59 Agenda ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● What's not in the Camel box? ● More Information
  • 60. 60 Creating new Camel Projects ● Using Command Shell ● .. or from Eclipse
  • 61. 61 Creating new Camel Projects ● Importing into Eclipse Existing Maven Project
  • 62. 62 Creating new Camel Projects ● Maven Archetypes camel-archetype-activemq camel-archetype-java camel-archetype-blueprint camel-archetype-scala camel-archetype-component camel-archetype-spring camel-archetype-dataformat camel-archetype-spring-dm camel-archetype-groovy camel-archetype-web
  • 63. 63 Creating new Camel Projects ● camel-archetype-spring mvn install mvn camel:run mvn io.hawt:hawtio-maven-plugin:1.3.1:spring
  • 64. 64 Agenda ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● What's not in the Camel box? ● More Information
  • 65. 65 What's not in the Camel box? ● 3rd party Apache Camel software ● Commercial Support ● http://camel.apache.org/commercial-camel-offerings.html ● User Stories ● http://camel.apache.org/user-stories.html ● External Components ● http://camel.apache.org/components.html (bottom) ● Apache Camel Extra ● https://code.google.com/a/apache-extras.org/p/camel-extra
  • 66. 66 What's not in the Camel box? Tooling – Eclipse Plugin – Fuse IDE Free community and Red Hat supported versions at: http://tools.jboss.org/downloads/
  • 67. 67 What's not in the Camel box? Tooling – Web Console - hawtio http://hawt.io
  • 68. 68 What's not in the Camel box? ● Integration Platform - fabric8 http://fabric8.io
  • 69. 69 Agenda ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● What's not in the Camel box? ● More Information
  • 70. 70 Where do I get more information? ● Best Article covering what Apache Camel is ● http://java.dzone.com/articles/open-source-integration- apache Link to article from “Getting Started”
  • 71. 71 Where do I get more information? ● Try Camel Examples ● http://camel.apache.org/examples.html ● Read other blogs and articles ● http://camel.apache.org/articles.html ● Use the “search box” on the Camel front page
  • 72. 72 Where do I get more information? ● Use the mailing list / forum ● http://camel.apache.org/mailing-lists.html ● Use stackoverflow ● http://stackoverflow.com/questions/tagged/apache-camel ● Use IRC chat ● http://camel.apache.org/irc-room.html
  • 73. 73 Where do I get more information? ● Buy the Camel in Action book http://manning.com/ibsen/ Use code ... camel40 
 for 40% discount
  • 74. 74 Where do I get more information? ● .. and/or any of the other Camel books in the market http://camel.apache.org/books
  • 75. 75 Any Questions ? ● Contact ● EMail: cibsen@redhat.com / claus.ibsen@gmail.com ● Twitter: @davsclaus ● Blog: http://davsclaus.com ● Linkedin: http://www.linkedin.com/in/davsclaus