SlideShare a Scribd company logo
PUBLIC PRESENTATION | CLAUS IBSEN1
Getting Started with Apache Camel
Claus Ibsen (@davsclaus)
Principal Software Engineer, Red Hat
Javagruppen Århus, may 2013
PUBLIC PRESENTATION | CLAUS IBSEN2
Agenda
● History of Camel
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN3
Your Speaker
● Principal Software Engineer at Red Hat
● Apache Camel
● 5 years working with Camel
● Author of Camel in Action book
● Contact
● EMail: cibsen@redhat.com
● Twitter: @davsclaus
● Blog: http://davsclaus.com
● Linkedin: http://www.linkedin.com/in/davsclaus
PUBLIC PRESENTATION | CLAUS IBSEN4
Why the name Camel?
PUBLIC PRESENTATION | CLAUS IBSEN5
Why the name Camel?
Because Camel is
easy to remember and type ...
PUBLIC PRESENTATION | CLAUS IBSEN6
Why the name Camel?
… or the creator used to smoke cigarets!
http://camel.apache.org/why-the-name-camel.html
PUBLIC PRESENTATION | CLAUS IBSEN7
Camel's parents
PUBLIC PRESENTATION | CLAUS IBSEN8
Camel's parents
James Strachan (creator of Camel)
Gregor Hohpe (author of EIP book)
PUBLIC PRESENTATION | CLAUS IBSEN9
The birth of Camel
● First Commit
PUBLIC PRESENTATION | CLAUS IBSEN10
The birth of Camel
● My first Commit
PUBLIC PRESENTATION | CLAUS IBSEN11
The birth of Camel
● First Release
● Apache Camel 1.0
June 2007
http://www.davsclaus.com/2012/05/looking-at-impressive-first-apache.html
PUBLIC PRESENTATION | CLAUS IBSEN12
Agenda
● History of Camel
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN13
What is Apache Camel?
● Quote from the website
PUBLIC PRESENTATION | CLAUS IBSEN14
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"
PUBLIC PRESENTATION | CLAUS IBSEN15
What is Apache Camel?
● What is Enterprise Integration Patterns?
It's a book
PUBLIC PRESENTATION | CLAUS IBSEN16
What is Apache Camel?
● Enterprise Integration Patterns
http://camel.apache.org/eip
PUBLIC PRESENTATION | CLAUS IBSEN17
What is Apache Camel?
● EIP - Content Based Router
PUBLIC PRESENTATION | CLAUS IBSEN18
What is Apache Camel?
from newOrder
PUBLIC PRESENTATION | CLAUS IBSEN19
What is Apache Camel?
from newOrder
choice
PUBLIC PRESENTATION | CLAUS IBSEN20
What is Apache Camel?
from newOrder
choice
when isWidget to widget
PUBLIC PRESENTATION | CLAUS IBSEN21
What is Apache Camel?
from newOrder
choice
when isWidget to widget
otherwise to gadget
PUBLIC PRESENTATION | CLAUS IBSEN22
What is Apache Camel?
from(newOrder)
choice
when(isWidget) to(widget)
otherwise to(gadget)
PUBLIC PRESENTATION | CLAUS IBSEN23
What is Apache Camel?
from(newOrder)
.choice()
.when(isWidget).to(widget)
.otherwise().to(gadget);
PUBLIC PRESENTATION | CLAUS IBSEN24
What is Apache Camel?
Endpoint newOrder = endpoint("activemq:queue:newOrder");
from(newOrder)
.choice()
.when(isWidget).to(widget)
.otherwise().to(gadget);
PUBLIC PRESENTATION | CLAUS IBSEN25
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);
PUBLIC PRESENTATION | CLAUS IBSEN26
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);
PUBLIC PRESENTATION | CLAUS IBSEN27
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();
}
PUBLIC PRESENTATION | CLAUS IBSEN28
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();
}
}
PUBLIC PRESENTATION | CLAUS IBSEN29
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();
}
}
PUBLIC PRESENTATION | CLAUS IBSEN30
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>
PUBLIC PRESENTATION | CLAUS IBSEN31
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
PUBLIC PRESENTATION | CLAUS IBSEN32
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
PUBLIC PRESENTATION | CLAUS IBSEN33
What is Apache Camel?
● Camel's Architecture
PUBLIC PRESENTATION | CLAUS IBSEN34
What is Apache Camel?
120+ Components
PUBLIC PRESENTATION | CLAUS IBSEN35
What is Apache Camel?
120+ Components
PUBLIC PRESENTATION | CLAUS IBSEN36
What is Apache Camel?
● Summary
● Integration Framework
● Enterprise Integration Patterns (EIP)
● Routing (using DSL)
● Easy Configuration (endpoint as uri's)
● Payload Agnostic
● No Container Dependency
● A lot of components
PUBLIC PRESENTATION | CLAUS IBSEN37
Agenda
● History of Camel
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● Extending Camel
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN38
A Little Example
● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN39
A Little Example
● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN40
A Little Example
● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN41
A Little Example
● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN42
A Little Example
● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN43
Agenda
● History of Camel
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN44
Riding Camel
● Downloading Apache Camel
● zip/tarball (approx 14mb)
http://camel.apache.org
PUBLIC PRESENTATION | CLAUS IBSEN45
Riding Camel
● Using Command Shell
● Requires: Apache Maven
● From Eclipse
PUBLIC PRESENTATION | CLAUS IBSEN46
Riding Camel
● Console Example
● cd examples/camel-example-console
● mvn compile exec:java
PUBLIC PRESENTATION | CLAUS IBSEN47
Riding Camel
● Twitter Example
● cd examples/camel-example-twitter-websocket
● mvn compile exec:java http://localhost:9090/index.html
PUBLIC PRESENTATION | CLAUS IBSEN48
Riding Camel
● More examples ...
... and further details at website.
http://camel.apache.org/examples
PUBLIC PRESENTATION | CLAUS IBSEN49
Agenda
● History of Camel
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the box?
● Deploying Camel
● Creating new Camel Projects
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN50
What's in the box?
PUBLIC PRESENTATION | CLAUS IBSEN51
What's in the box?
● Enterprise Integration Patterns
http://camel.apache.org/eip
PUBLIC PRESENTATION | CLAUS IBSEN52
What's in the box?
● Pipes and Filters EIP
PUBLIC PRESENTATION | CLAUS IBSEN53
What's in the box?
● Pipes and Filters EIP
PUBLIC PRESENTATION | CLAUS IBSEN54
What's in the box?
● Recipient List EIP
PUBLIC PRESENTATION | CLAUS IBSEN55
What's in the box?
● Recipient List EIP
PUBLIC PRESENTATION | CLAUS IBSEN56
What's in the box?
● Splitter EIP
PUBLIC PRESENTATION | CLAUS IBSEN57
What's in the box?
120+ Components
PUBLIC PRESENTATION | CLAUS IBSEN58
What's in the box?
19 Data Formats
PUBLIC PRESENTATION | CLAUS IBSEN59
What's in the box?
15 Expression Languages
PUBLIC PRESENTATION | CLAUS IBSEN60
What's in the box?
5+ DSL in multiple languages
● Java DSL
● XML DSL (Spring and OSGi Blueprint)
● Groovy DSL
● Scala DSL
● Kotlin DSL (work in progress)
PUBLIC PRESENTATION | CLAUS IBSEN61
What's in the box?
● Type Converters
PUBLIC PRESENTATION | CLAUS IBSEN62
What's in the box?
● Writing Custom Type Converter
PUBLIC PRESENTATION | CLAUS IBSEN63
What's in the box?
● Bean as Message Translator
PUBLIC PRESENTATION | CLAUS IBSEN64
What's in the box?
● Bean as Message Translator
PUBLIC PRESENTATION | CLAUS IBSEN65
What's in the box?
● Working with beans
PUBLIC PRESENTATION | CLAUS IBSEN66
What's in the box?
● Working with beans
PUBLIC PRESENTATION | CLAUS IBSEN67
What's in the box?
● Working with beans
PUBLIC PRESENTATION | CLAUS IBSEN68
What's in the box?
● Working with beans
PUBLIC PRESENTATION | CLAUS IBSEN69
What's in the box?
Test Kit
● camel-test camel-test-spring
● camel-test-blueprint camel-testng
PUBLIC PRESENTATION | CLAUS IBSEN70
What's in the box?
Management
● JMX
● REST
(@deprecated)
PUBLIC PRESENTATION | CLAUS IBSEN71
What's in the box?
Tooling – Web console - HawtIO
http://hawt.io
PUBLIC PRESENTATION | CLAUS IBSEN72
What's in the box?
Tooling – Eclipse Plugin – Fuse IDE
http://github.com/fusesource/fuseide
PUBLIC PRESENTATION | CLAUS IBSEN73
What's in the box?
Error Handling
PUBLIC PRESENTATION | CLAUS IBSEN74
What's in the box?
try .. catch style
PUBLIC PRESENTATION | CLAUS IBSEN75
What's in the box?
Dead Letter Channel (EIP style)
PUBLIC PRESENTATION | CLAUS IBSEN76
What's in the box?
Dead Letter Channel (EIP style)
PUBLIC PRESENTATION | CLAUS IBSEN77
What's in the box?
The Rest
● Interceptors
● Security
● Route Policy
● Type Converters
● Transaction
● Compensation as rollback
● Asynchronous non-blocking routing engine
● Thread management
● Maven Tooling
● ... and much more
PUBLIC PRESENTATION | CLAUS IBSEN78
Agenda
● History of Camel
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● Extending Camel
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN79
Deploying Camel
● Deployment Strategy
● No Container Dependency
● Lightweight & Embeddable
● Deployment Options
● Standalone
● WAR
● Spring
● JEE
● OSGi
● Cloud
PUBLIC PRESENTATION | CLAUS IBSEN80
Camel as a Client
● Java Client Application (no routes)
● Example
● Upload a file to a FTP server
PUBLIC PRESENTATION | CLAUS IBSEN81
Agenda
● History of Camel
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN82
Creating new Camel Projects
● Using Command Shell
● From Eclipse
PUBLIC PRESENTATION | CLAUS IBSEN83
Creating new Camel Projects
● Maven Archetypes
PUBLIC PRESENTATION | CLAUS IBSEN84
Creating new Camel Projects
● camel-archetype-blueprint
PUBLIC PRESENTATION | CLAUS IBSEN85
Creating new Camel Projects
● Importing into Eclipse
Existing Maven Project
PUBLIC PRESENTATION | CLAUS IBSEN86
Creating new Camel Projects
● Testing Camel Projects
● ... from inside Eclipse
PUBLIC PRESENTATION | CLAUS IBSEN87
Agenda
● History of Camel
● What is Apache Camel?
● A little Example
● Riding Camel
● What's in the Camel box?
● Deploying Camel
● Creating new Camel Projects
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN88
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”
PUBLIC PRESENTATION | CLAUS IBSEN89
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
PUBLIC PRESENTATION | CLAUS IBSEN90
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
PUBLIC PRESENTATION | CLAUS IBSEN91
Where do I get more information?
● Buy the Camel in Action book
http://manning.com/ibsen/
Use code ...
camel40
… for 40% discount
PUBLIC PRESENTATION | CLAUS IBSEN92
Any Questions ?
● Contact
● EMail: cibsen@redhat.com
● Twitter: @davsclaus
● Blog: http://davsclaus.com
● Linkedin: http://www.linkedin.com/in/davsclaus

More Related Content

ODP
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
ODP
Getting Started with Apache Camel - Devconf Conference - February 2013
ODP
Microservices with apache_camel_barcelona
ODP
Getting started with Apache Camel - Javagruppen Copenhagen - April 2014
PDF
Getting started with Apache Camel - jDays 2013
ODP
Microservices with Apache Camel
ODP
Integration using Apache Camel and Groovy
ODP
Apache Camel workshop at BarcelonaJUG in January 2014
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Getting Started with Apache Camel - Devconf Conference - February 2013
Microservices with apache_camel_barcelona
Getting started with Apache Camel - Javagruppen Copenhagen - April 2014
Getting started with Apache Camel - jDays 2013
Microservices with Apache Camel
Integration using Apache Camel and Groovy
Apache Camel workshop at BarcelonaJUG in January 2014

What's hot (20)

ODP
Using Apache Camel connectors for external connectivity
ODP
Getting Started with Apache Camel at DevNation 2014
PDF
Apache Camel - The integration library
ODP
Getting Started with Apache Camel - Malmo JUG - March 2013
PDF
Enterprise Integration Patterns with Apache Camel
PPT
Integration made easy with Apache Camel
PDF
Developing Java based microservices ready for the world of containers
ODP
Developing Microservices with Apache Camel
PDF
Camel Day Italy 2021 - What's new in Camel 3
PDF
Developing Java based microservices ready for the world of containers
PPTX
Serverless integration with Knative and Apache Camel on Kubernetes
PDF
Event Driven Architecture with Apache Camel
PDF
Apache Camel - FUSE community day London 2010 presentation
PDF
Best Practices for Middleware and Integration Architecture Modernization with...
PDF
JEEConf 2018 - Camel microservices with Spring Boot and Kubernetes
PDF
Developing, Testing and Scaling with Apache Camel - UberConf 2015
PDF
Apache Camel in the belly of the Docker whale
PDF
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
PDF
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
PDF
The Many Ways to Test Your React App
Using Apache Camel connectors for external connectivity
Getting Started with Apache Camel at DevNation 2014
Apache Camel - The integration library
Getting Started with Apache Camel - Malmo JUG - March 2013
Enterprise Integration Patterns with Apache Camel
Integration made easy with Apache Camel
Developing Java based microservices ready for the world of containers
Developing Microservices with Apache Camel
Camel Day Italy 2021 - What's new in Camel 3
Developing Java based microservices ready for the world of containers
Serverless integration with Knative and Apache Camel on Kubernetes
Event Driven Architecture with Apache Camel
Apache Camel - FUSE community day London 2010 presentation
Best Practices for Middleware and Integration Architecture Modernization with...
JEEConf 2018 - Camel microservices with Spring Boot and Kubernetes
Developing, Testing and Scaling with Apache Camel - UberConf 2015
Apache Camel in the belly of the Docker whale
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
The Many Ways to Test Your React App
Ad

Similar to Getting started with Apache Camel - May 2013 (20)

PDF
Integration using Apache Camel and Groovy
PDF
Apache Camel Introduction
PPTX
ApacheCon EU 2016 - Apache Camel the integration library
PDF
Apache camel community day - october 2010
PPTX
Apache Camel framework Presentation and selection of apache camel for various...
PDF
Apache Camel Introduction & What's in the box
KEY
Apache Camel - JEEConf May 2011
PPTX
Essential Camel Components
PDF
Solving Enterprise Integration with Apache Camel
PPTX
Apache Camel K - Fredericia
PDF
Taking Apache Camel For A Ride
PDF
Introduction of Apache Camel
KEY
What Riding the Camel can do to make integration easier for you
PPTX
Apache camel
PDF
apachecamelk-april2019-190409093034.pdf
PDF
Enterprise Integration Patterns and DSL with Apache Camel
PPTX
Apache Camel K - Copenhagen v2
PPTX
Apache Camel K - Copenhagen
PDF
Introduction to Apache Camel
PDF
Apache Camel - Stéphane Kay - April 2011
Integration using Apache Camel and Groovy
Apache Camel Introduction
ApacheCon EU 2016 - Apache Camel the integration library
Apache camel community day - october 2010
Apache Camel framework Presentation and selection of apache camel for various...
Apache Camel Introduction & What's in the box
Apache Camel - JEEConf May 2011
Essential Camel Components
Solving Enterprise Integration with Apache Camel
Apache Camel K - Fredericia
Taking Apache Camel For A Ride
Introduction of Apache Camel
What Riding the Camel can do to make integration easier for you
Apache camel
apachecamelk-april2019-190409093034.pdf
Enterprise Integration Patterns and DSL with Apache Camel
Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen
Introduction to Apache Camel
Apache Camel - Stéphane Kay - April 2011
Ad

More from Claus Ibsen (13)

PDF
Low Code Integration with Apache Camel.pdf
PDF
Camel JBang - Quarkus Insights.pdf
PDF
Integrating systems in the age of Quarkus and Camel
PDF
DevNation Live 2020 - What's new with Apache Camel 3
PDF
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
PDF
Apache Camel v3, Camel K and Camel Quarkus
PDF
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
PDF
State of integration with Apache Camel (ApacheCon 2019)
PPTX
Integrating microservices with apache camel on kubernetes
PPTX
Camel riders in the cloud
PDF
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
PPTX
Introduction to Apache Camel
PDF
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Low Code Integration with Apache Camel.pdf
Camel JBang - Quarkus Insights.pdf
Integrating systems in the age of Quarkus and Camel
DevNation Live 2020 - What's new with Apache Camel 3
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Apache Camel v3, Camel K and Camel Quarkus
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
State of integration with Apache Camel (ApacheCon 2019)
Integrating microservices with apache camel on kubernetes
Camel riders in the cloud
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
Introduction to Apache Camel
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Cloud computing and distributed systems.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Electronic commerce courselecture one. Pdf
PDF
Approach and Philosophy of On baking technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The AUB Centre for AI in Media Proposal.docx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation_ Review paper, used for researhc scholars
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Chapter 3 Spatial Domain Image Processing.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Cloud computing and distributed systems.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Unlocking AI with Model Context Protocol (MCP)
Dropbox Q2 2025 Financial Results & Investor Presentation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Advanced methodologies resolving dimensionality complications for autism neur...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Network Security Unit 5.pdf for BCA BBA.
Per capita expenditure prediction using model stacking based on satellite ima...
Electronic commerce courselecture one. Pdf
Approach and Philosophy of On baking technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

Getting started with Apache Camel - May 2013

  • 1. PUBLIC PRESENTATION | CLAUS IBSEN1 Getting Started with Apache Camel Claus Ibsen (@davsclaus) Principal Software Engineer, Red Hat Javagruppen Århus, may 2013
  • 2. PUBLIC PRESENTATION | CLAUS IBSEN2 Agenda ● History of Camel ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● Q and A
  • 3. PUBLIC PRESENTATION | CLAUS IBSEN3 Your Speaker ● Principal Software Engineer at Red Hat ● Apache Camel ● 5 years working with Camel ● 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. PUBLIC PRESENTATION | CLAUS IBSEN4 Why the name Camel?
  • 5. PUBLIC PRESENTATION | CLAUS IBSEN5 Why the name Camel? Because Camel is easy to remember and type ...
  • 6. PUBLIC PRESENTATION | CLAUS IBSEN6 Why the name Camel? … or the creator used to smoke cigarets! http://camel.apache.org/why-the-name-camel.html
  • 7. PUBLIC PRESENTATION | CLAUS IBSEN7 Camel's parents
  • 8. PUBLIC PRESENTATION | CLAUS IBSEN8 Camel's parents James Strachan (creator of Camel) Gregor Hohpe (author of EIP book)
  • 9. PUBLIC PRESENTATION | CLAUS IBSEN9 The birth of Camel ● First Commit
  • 10. PUBLIC PRESENTATION | CLAUS IBSEN10 The birth of Camel ● My first Commit
  • 11. PUBLIC PRESENTATION | CLAUS IBSEN11 The birth of Camel ● First Release ● Apache Camel 1.0 June 2007 http://www.davsclaus.com/2012/05/looking-at-impressive-first-apache.html
  • 12. PUBLIC PRESENTATION | CLAUS IBSEN12 Agenda ● History of Camel ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● Q and A
  • 13. PUBLIC PRESENTATION | CLAUS IBSEN13 What is Apache Camel? ● Quote from the website
  • 14. PUBLIC PRESENTATION | CLAUS IBSEN14 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"
  • 15. PUBLIC PRESENTATION | CLAUS IBSEN15 What is Apache Camel? ● What is Enterprise Integration Patterns? It's a book
  • 16. PUBLIC PRESENTATION | CLAUS IBSEN16 What is Apache Camel? ● Enterprise Integration Patterns http://camel.apache.org/eip
  • 17. PUBLIC PRESENTATION | CLAUS IBSEN17 What is Apache Camel? ● EIP - Content Based Router
  • 18. PUBLIC PRESENTATION | CLAUS IBSEN18 What is Apache Camel? from newOrder
  • 19. PUBLIC PRESENTATION | CLAUS IBSEN19 What is Apache Camel? from newOrder choice
  • 20. PUBLIC PRESENTATION | CLAUS IBSEN20 What is Apache Camel? from newOrder choice when isWidget to widget
  • 21. PUBLIC PRESENTATION | CLAUS IBSEN21 What is Apache Camel? from newOrder choice when isWidget to widget otherwise to gadget
  • 22. PUBLIC PRESENTATION | CLAUS IBSEN22 What is Apache Camel? from(newOrder) choice when(isWidget) to(widget) otherwise to(gadget)
  • 23. PUBLIC PRESENTATION | CLAUS IBSEN23 What is Apache Camel? from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget);
  • 24. PUBLIC PRESENTATION | CLAUS IBSEN24 What is Apache Camel? Endpoint newOrder = endpoint("activemq:queue:newOrder"); from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget);
  • 25. PUBLIC PRESENTATION | CLAUS IBSEN25 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);
  • 26. PUBLIC PRESENTATION | CLAUS IBSEN26 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);
  • 27. PUBLIC PRESENTATION | CLAUS IBSEN27 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(); }
  • 28. PUBLIC PRESENTATION | CLAUS IBSEN28 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(); } }
  • 29. PUBLIC PRESENTATION | CLAUS IBSEN29 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(); } }
  • 30. PUBLIC PRESENTATION | CLAUS IBSEN30 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>
  • 31. PUBLIC PRESENTATION | CLAUS IBSEN31 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
  • 32. PUBLIC PRESENTATION | CLAUS IBSEN32 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
  • 33. PUBLIC PRESENTATION | CLAUS IBSEN33 What is Apache Camel? ● Camel's Architecture
  • 34. PUBLIC PRESENTATION | CLAUS IBSEN34 What is Apache Camel? 120+ Components
  • 35. PUBLIC PRESENTATION | CLAUS IBSEN35 What is Apache Camel? 120+ Components
  • 36. PUBLIC PRESENTATION | CLAUS IBSEN36 What is Apache Camel? ● Summary ● Integration Framework ● Enterprise Integration Patterns (EIP) ● Routing (using DSL) ● Easy Configuration (endpoint as uri's) ● Payload Agnostic ● No Container Dependency ● A lot of components
  • 37. PUBLIC PRESENTATION | CLAUS IBSEN37 Agenda ● History of Camel ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● Extending Camel ● Q and A
  • 38. PUBLIC PRESENTATION | CLAUS IBSEN38 A Little Example ● File Copier Example
  • 39. PUBLIC PRESENTATION | CLAUS IBSEN39 A Little Example ● File Copier Example
  • 40. PUBLIC PRESENTATION | CLAUS IBSEN40 A Little Example ● File Copier Example
  • 41. PUBLIC PRESENTATION | CLAUS IBSEN41 A Little Example ● File Copier Example
  • 42. PUBLIC PRESENTATION | CLAUS IBSEN42 A Little Example ● File Copier Example
  • 43. PUBLIC PRESENTATION | CLAUS IBSEN43 Agenda ● History of Camel ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● Q and A
  • 44. PUBLIC PRESENTATION | CLAUS IBSEN44 Riding Camel ● Downloading Apache Camel ● zip/tarball (approx 14mb) http://camel.apache.org
  • 45. PUBLIC PRESENTATION | CLAUS IBSEN45 Riding Camel ● Using Command Shell ● Requires: Apache Maven ● From Eclipse
  • 46. PUBLIC PRESENTATION | CLAUS IBSEN46 Riding Camel ● Console Example ● cd examples/camel-example-console ● mvn compile exec:java
  • 47. PUBLIC PRESENTATION | CLAUS IBSEN47 Riding Camel ● Twitter Example ● cd examples/camel-example-twitter-websocket ● mvn compile exec:java http://localhost:9090/index.html
  • 48. PUBLIC PRESENTATION | CLAUS IBSEN48 Riding Camel ● More examples ... ... and further details at website. http://camel.apache.org/examples
  • 49. PUBLIC PRESENTATION | CLAUS IBSEN49 Agenda ● History of Camel ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the box? ● Deploying Camel ● Creating new Camel Projects ● Q and A
  • 50. PUBLIC PRESENTATION | CLAUS IBSEN50 What's in the box?
  • 51. PUBLIC PRESENTATION | CLAUS IBSEN51 What's in the box? ● Enterprise Integration Patterns http://camel.apache.org/eip
  • 52. PUBLIC PRESENTATION | CLAUS IBSEN52 What's in the box? ● Pipes and Filters EIP
  • 53. PUBLIC PRESENTATION | CLAUS IBSEN53 What's in the box? ● Pipes and Filters EIP
  • 54. PUBLIC PRESENTATION | CLAUS IBSEN54 What's in the box? ● Recipient List EIP
  • 55. PUBLIC PRESENTATION | CLAUS IBSEN55 What's in the box? ● Recipient List EIP
  • 56. PUBLIC PRESENTATION | CLAUS IBSEN56 What's in the box? ● Splitter EIP
  • 57. PUBLIC PRESENTATION | CLAUS IBSEN57 What's in the box? 120+ Components
  • 58. PUBLIC PRESENTATION | CLAUS IBSEN58 What's in the box? 19 Data Formats
  • 59. PUBLIC PRESENTATION | CLAUS IBSEN59 What's in the box? 15 Expression Languages
  • 60. PUBLIC PRESENTATION | CLAUS IBSEN60 What's in the box? 5+ DSL in multiple languages ● Java DSL ● XML DSL (Spring and OSGi Blueprint) ● Groovy DSL ● Scala DSL ● Kotlin DSL (work in progress)
  • 61. PUBLIC PRESENTATION | CLAUS IBSEN61 What's in the box? ● Type Converters
  • 62. PUBLIC PRESENTATION | CLAUS IBSEN62 What's in the box? ● Writing Custom Type Converter
  • 63. PUBLIC PRESENTATION | CLAUS IBSEN63 What's in the box? ● Bean as Message Translator
  • 64. PUBLIC PRESENTATION | CLAUS IBSEN64 What's in the box? ● Bean as Message Translator
  • 65. PUBLIC PRESENTATION | CLAUS IBSEN65 What's in the box? ● Working with beans
  • 66. PUBLIC PRESENTATION | CLAUS IBSEN66 What's in the box? ● Working with beans
  • 67. PUBLIC PRESENTATION | CLAUS IBSEN67 What's in the box? ● Working with beans
  • 68. PUBLIC PRESENTATION | CLAUS IBSEN68 What's in the box? ● Working with beans
  • 69. PUBLIC PRESENTATION | CLAUS IBSEN69 What's in the box? Test Kit ● camel-test camel-test-spring ● camel-test-blueprint camel-testng
  • 70. PUBLIC PRESENTATION | CLAUS IBSEN70 What's in the box? Management ● JMX ● REST (@deprecated)
  • 71. PUBLIC PRESENTATION | CLAUS IBSEN71 What's in the box? Tooling – Web console - HawtIO http://hawt.io
  • 72. PUBLIC PRESENTATION | CLAUS IBSEN72 What's in the box? Tooling – Eclipse Plugin – Fuse IDE http://github.com/fusesource/fuseide
  • 73. PUBLIC PRESENTATION | CLAUS IBSEN73 What's in the box? Error Handling
  • 74. PUBLIC PRESENTATION | CLAUS IBSEN74 What's in the box? try .. catch style
  • 75. PUBLIC PRESENTATION | CLAUS IBSEN75 What's in the box? Dead Letter Channel (EIP style)
  • 76. PUBLIC PRESENTATION | CLAUS IBSEN76 What's in the box? Dead Letter Channel (EIP style)
  • 77. PUBLIC PRESENTATION | CLAUS IBSEN77 What's in the box? The Rest ● Interceptors ● Security ● Route Policy ● Type Converters ● Transaction ● Compensation as rollback ● Asynchronous non-blocking routing engine ● Thread management ● Maven Tooling ● ... and much more
  • 78. PUBLIC PRESENTATION | CLAUS IBSEN78 Agenda ● History of Camel ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● Extending Camel ● Q and A
  • 79. PUBLIC PRESENTATION | CLAUS IBSEN79 Deploying Camel ● Deployment Strategy ● No Container Dependency ● Lightweight & Embeddable ● Deployment Options ● Standalone ● WAR ● Spring ● JEE ● OSGi ● Cloud
  • 80. PUBLIC PRESENTATION | CLAUS IBSEN80 Camel as a Client ● Java Client Application (no routes) ● Example ● Upload a file to a FTP server
  • 81. PUBLIC PRESENTATION | CLAUS IBSEN81 Agenda ● History of Camel ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● Q and A
  • 82. PUBLIC PRESENTATION | CLAUS IBSEN82 Creating new Camel Projects ● Using Command Shell ● From Eclipse
  • 83. PUBLIC PRESENTATION | CLAUS IBSEN83 Creating new Camel Projects ● Maven Archetypes
  • 84. PUBLIC PRESENTATION | CLAUS IBSEN84 Creating new Camel Projects ● camel-archetype-blueprint
  • 85. PUBLIC PRESENTATION | CLAUS IBSEN85 Creating new Camel Projects ● Importing into Eclipse Existing Maven Project
  • 86. PUBLIC PRESENTATION | CLAUS IBSEN86 Creating new Camel Projects ● Testing Camel Projects ● ... from inside Eclipse
  • 87. PUBLIC PRESENTATION | CLAUS IBSEN87 Agenda ● History of Camel ● What is Apache Camel? ● A little Example ● Riding Camel ● What's in the Camel box? ● Deploying Camel ● Creating new Camel Projects ● Q and A
  • 88. PUBLIC PRESENTATION | CLAUS IBSEN88 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”
  • 89. PUBLIC PRESENTATION | CLAUS IBSEN89 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
  • 90. PUBLIC PRESENTATION | CLAUS IBSEN90 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
  • 91. PUBLIC PRESENTATION | CLAUS IBSEN91 Where do I get more information? ● Buy the Camel in Action book http://manning.com/ibsen/ Use code ... camel40 … for 40% discount
  • 92. PUBLIC PRESENTATION | CLAUS IBSEN92 Any Questions ? ● Contact ● EMail: cibsen@redhat.com ● Twitter: @davsclaus ● Blog: http://davsclaus.com ● Linkedin: http://www.linkedin.com/in/davsclaus