apachecon eu 2016 - apache camel the integration library
TRANSCRIPT
![Page 1: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/1.jpg)
Apache CamelThe Integration
Library
EU 2016
Claus Ibsen
![Page 2: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/2.jpg)
Claus Ibsen• Senior Principal Software Engineer
at Red Hat
• Apache Camel8+ years commiter and PMC member
• Author ofCamel in Action books
@davsclausdavsclaus
![Page 3: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/3.jpg)
Agenda• What is Apache Camel?
• Little Example
• Trying Apache Camel
• What's in the Camel Box?
• Running Camel
• More Information
![Page 4: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/4.jpg)
What is Apache Camel?
• Quote from the website
Apache Camel is apowerful Open SourceIntegration Framework
based onEnterprise Integration Patterns
![Page 5: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/5.jpg)
What is Apache Camel?
• Quote from the website
Apache Camel is apowerful Open SourceIntegration Framework
based onEnterprise Integration Patterns
![Page 6: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/6.jpg)
Integration Framework
![Page 7: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/7.jpg)
Enterprise Integration Patterns
![Page 8: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/8.jpg)
Enterprise Integration Patterns
![Page 9: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/9.jpg)
Content Based Router
![Page 10: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/10.jpg)
Content Based Router
from newOrder
![Page 11: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/11.jpg)
Content Based Router
from newOrder choice
![Page 12: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/12.jpg)
Content Based Router
from newOrder choice when isWidget to widget
![Page 13: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/13.jpg)
Content Based Router
from newOrder choice when isWidget to widget otherwise to gadget
![Page 14: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/14.jpg)
Content Based Router
from(newOrder) choice when(isWidget) to(widget) otherwise to(gadget)
![Page 15: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/15.jpg)
Content Based Router
from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget);
![Page 16: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/16.jpg)
Content Based Router
Endpoint newOrder = endpoint("activemq:queue:newOrder");
from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget);
![Page 17: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/17.jpg)
Content Based Router
Endpoint newOrder = endpoint("activemq:queue:newOrder");Predicate isWidget = xpath("/order/product = 'widget'");
from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget);
![Page 18: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/18.jpg)
Content Based Router
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);
![Page 19: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/19.jpg)
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); }
![Page 20: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/20.jpg)
Java Codeimport 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); }}
![Page 21: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/21.jpg)
Java DSLimport 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"); }}
![Page 22: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/22.jpg)
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>
![Page 23: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/23.jpg)
Endpoint 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
![Page 24: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/24.jpg)
Endpoint 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
![Page 25: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/25.jpg)
Just Java Code
![Page 26: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/26.jpg)
Just XML
![Page 27: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/27.jpg)
Architecture
![Page 28: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/28.jpg)
Componentsahc bindy coap docker
ahc-ws blueprint cometd dozerapns boon context dropbox
atmosphere box couchdb eclipseatom cache crypto ejbaws cassandraql csv elasticsearchbam castor cfx elsql
bean-validator cdi cxf-transport eventadminbeanio chunk disruptor exec
beanstalk cmis dns facebook
![Page 29: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/29.jpg)
Componentsflatpack google-drive hbase jacksonxml
fop google-mail hdfs jasyptfreemarker gora hdfs2 javaspace
ftp grape http jaxbgae groovy http4 jbpm
ganglia gson ibatis jclouds
geocoder guava-eventbus ical jcr
git guice infinispan jdbcgithub hawtdb irc jetty8google-calendar hazelcast jackson jetty9
![Page 30: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/30.jpg)
Componentsjgroups jsonpath leveldb mustache
jibx jt400 linkedin mveljing juel lucene mybatisjira jxpath mail nettyjms kafka metrics netty-httpjmx kestrel mina netty4jolt krati mina2 netty4-http
josql kubernetes mongodb ognljpa kura mqtt olingo2jsch ldap msv openshift
![Page 31: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/31.jpg)
Componentsoptaplanner rabbitmq scala smpp
paho restlet schematron snpppaxlogging rmi scr soap
pdf routebox script solrpgevent rss servlet spark-restprinter ruby servletlistener spring
protobuf rx shiro spring-batchquartz salesforce sip spring-boot
quarz2 sap-netweaver sjms spring-integration
quickfix saxon slack spring-javaconfig
![Page 32: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/32.jpg)
Componentsspring-ldap swagger undertow xmlsecurityspring-redis swagger-java univocity xmpp
spring-security syslog urlrewrite xstreamspring-ws tagsoup velocity yammer
sql tarfile vertx zipfilessh test weather zookeeperstax test-blueprint websocket
stomp test-spring xmlbeansstream testng xmljson
stringtemplate twitter xmlrpc
![Page 33: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/33.jpg)
![Page 34: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/34.jpg)
+
![Page 35: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/35.jpg)
+
+
![Page 36: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/36.jpg)
+
+
+
![Page 37: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/37.jpg)
+
+
+ =
![Page 38: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/38.jpg)
Apache Camelon GitHub Numbers
• Project created March 2007
• 1058 Stars
• 102 Releases
• 25000+ Commits
• 253 Contributors
• 1254 Closed Pull Requests
A star on github is appreciated
![Page 39: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/39.jpg)
Agenda• What is Apache Camel?
• Little Example
• Trying Apache Camel
• What's in the Camel Box?
• Running Camel
• More Information
![Page 40: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/40.jpg)
File Copier Example
![Page 41: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/41.jpg)
Public Static Void Main
![Page 42: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/42.jpg)
Create CamelContext
![Page 43: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/43.jpg)
Add RouteBuilder
![Page 44: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/44.jpg)
Java DSL
![Page 45: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/45.jpg)
Start / Stop
![Page 46: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/46.jpg)
Camel Main
![Page 47: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/47.jpg)
Agenda• What is Apache Camel?
• Little Example
• Trying Apache Camel
• What's in the Camel Box?
• Running Camel
• More Information
![Page 48: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/48.jpg)
Trying Camel• Download Apache Camel 2.18.0
• tar xf apache-camel-2.18.0.tar.gz• cd apache-camel-2.18.0• cd examples
read readme.md first
![Page 49: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/49.jpg)
Beginner Example• camel-example-console
mvn camel:run
![Page 50: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/50.jpg)
Run with web console
mvn io.hawt:hawtio-maven-plugin:1.4.66:camel
http://hawt.io/maven
![Page 51: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/51.jpg)
Spring Boot Starter
![Page 52: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/52.jpg)
Spring Boot
![Page 53: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/53.jpg)
WildFly Swarm Generator
![Page 54: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/54.jpg)
WildFly Swarm CDI
![Page 55: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/55.jpg)
Apache ServiceMix
• Download Apache ServiceMix 7.0.0.M2• unzip apache-servicemix-7.0.0.M2.zip• cd apache-servicemix-7.0.0.M2• cd examples/camel
read readme.txt first
![Page 56: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/56.jpg)
Agenda• What is Apache Camel?
• Little Example
• Trying Apache Camel
• What's in the Camel Box?
• More Information
![Page 57: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/57.jpg)
What's in the Camel Box?
![Page 59: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/59.jpg)
Splitter
![Page 60: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/60.jpg)
Splitter
from("file:inbox")
![Page 61: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/61.jpg)
Splitter
from("file:inbox") .split(body().tokenize("\n"))
![Page 62: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/62.jpg)
Splitter
from("file:inbox") .split(body().tokenize("\n")) .marshal(customToXml)
Custom Data Format
![Page 63: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/63.jpg)
Splitter
from("file:inbox") .split(body().tokenize("\n")) .marshal(customToXml) .to("activemq:line");
Custom Data Format
![Page 64: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/64.jpg)
Componentsahc bindy coap docker
ahc-ws blueprint cometd dozerapns boon context dropbox
atmosphere box couchdb eclipseatom cache crypto ejbaws cassandraql csv elasticsearchbam castor cfx elsql
bean-validator cdi cxf-transport eventadminbeanio chunk disruptor exec
beanstalk cmis dns facebook
camel-catalog:component-list | wc -l219
![Page 65: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/65.jpg)
Data Formatsavro flatpack pgp univocity-fixed
barcode gzip protobuf univocity-tsvbase64 hl7 rss xmlBeansbeanio ical secureXML xmjson
bindy-csv jacksonxml serialization xmlrpcbindy-fixed jaxb soapjaxb xstreambindy-kvp jibx string zip
boon json-gson syslog zipfilecastor json-jackson tarfilecrypto json-xstream tidyMarkup
csv mime-multipart univocity-csv
camel-catalog:dataformat-list | wc -l47
![Page 66: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/66.jpg)
Data Format with JAXB
• POJO class with @JAXB annotations
![Page 67: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/67.jpg)
Data Format with JAXB
• marshal (xml -> pojo)• unmarshal (pojo -> xml)
![Page 68: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/68.jpg)
Languagesbean header php sql
constant javaScript python terser
el jsonpath ref tokenize
exchangeProperty jxpath ruby xpath
file mvel simple xquery
groovy ognl spel xtokenize
camel-catalog:language-list | wc -l26
![Page 69: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/69.jpg)
Language w/ Simple
![Page 70: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/70.jpg)
Language w/ Groovyhere you can do groovy
programming
![Page 71: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/71.jpg)
Camel DSLs
• Java DSL
• XML DSL (spring or OSGi blueprint)
• Groovy DSL
• Scala DSLGroovy and Scala
are not much in use
Java8 DSL in the works
![Page 72: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/72.jpg)
ProducerTemplate• Client API (alike Spring Templates)
Send a message to any Camel endpoint
![Page 73: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/73.jpg)
ProducerTemplate• Client API (alike Spring Templates)
FTP serverJavaApplication
How to upload a fileto a FTP server from Java code
![Page 74: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/74.jpg)
ProducerTemplate
FTP server
JavaApplicatio
n
![Page 75: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/75.jpg)
FluentProducerTemplate
FTP server
JavaApplicatio
n
![Page 76: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/76.jpg)
Test Kit
camel-test camel-test-blueprintcamel-test-cdi camel-test-karaf
camel-test-spring camel-testng
![Page 77: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/77.jpg)
camel-test
![Page 78: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/78.jpg)
camel-testeasy to run or debug
![Page 79: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/79.jpg)
camel-test1) set expectations
![Page 80: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/80.jpg)
camel-test1) set expectations
2) send message(s)
![Page 81: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/81.jpg)
camel-test1) set expectations
2) send message(s)
3) assert
![Page 82: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/82.jpg)
Management• JMX
![Page 83: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/83.jpg)
• Reliable Shutdown
Graceful Shutdown
Route A
Route B
Route C
2
1
3 4
5
6
Startup Shutdown
Stop accept new messages
Complete currentinflight messages
![Page 84: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/84.jpg)
Camel Commands• Apache Karaf / ServiceMix
![Page 85: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/85.jpg)
Camel Commands• Spring Boot
![Page 86: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/86.jpg)
Rest DSL (XML)
![Page 87: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/87.jpg)
Rest DSL (Java)
use REST verbs to define servicesthat becomes Camel routes
![Page 88: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/88.jpg)
Rest DSL
configure RESTand turn on swagger api
![Page 89: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/89.jpg)
Swagger Doc
swagger doc as json schema
![Page 90: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/90.jpg)
Swagger Doc
embeddedswagger-ui
![Page 91: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/91.jpg)
Rest DSL Example
cd examples/camel-example-swagger-xmlmvn jetty:run
![Page 92: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/92.jpg)
Error Handling
![Page 93: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/93.jpg)
Error Handling
![Page 94: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/94.jpg)
Error Handling
![Page 95: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/95.jpg)
Error Handling
![Page 96: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/96.jpg)
Circuit Breaker• Netflixx Hystrix
New in Camel 2.18
![Page 97: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/97.jpg)
Circuit Breaker• Integrates with Hystrix Dashboard
![Page 98: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/98.jpg)
Maven Tooling• Archetypes
camel-archetype-java camel-archetype-componentcamel-archetype-spring camel-archetype-api-componentcamel-archetype-web camel-archetype-dataformatcamel-archetype-cdi
camel-archetype-spring-boot camel-archetype-scalacamel-archetype-blueprint camel-archetype-groovycamel-archetype-spring-dm
camel-archetype-scr camel-archetype-java8
New in Camel 2.18
![Page 99: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/99.jpg)
Maven Tooling• camel-maven-plugin
mvn camel:run
![Page 100: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/100.jpg)
Maven Tooling• fabric8-camel-maven-plugin
mvn fabric8-camel:validate
http://fabric8.io/guide/camelMavenPlugin.html
Validate your Camel uris
from the source
![Page 101: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/101.jpg)
All the other stuffType Converter Transactions
Interceptors Security
Thread Management Route Policy
Java8 DSL Asynchronous Non-Blocking Routing Engine
POJO Routing Debugging & Tracing
![Page 102: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/102.jpg)
Agenda• What is Apache Camel?
• Little Example
• Trying Apache Camel
• What's in the Camel Box?
• Running Camel
• More Information
![Page 103: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/103.jpg)
Running CamelStandalone Web Application
Camel Spring XML JEE Application
Camel Spring Boot Apache Karaf / ServiceMix (OSGi)
Camel CDI WildFly / WildFly-Swarm(wildfly-camel)
Camel Guice vert.x(vertx-camel)
![Page 104: ApacheCon EU 2016 - Apache Camel the integration library](https://reader036.vdocuments.us/reader036/viewer/2022062223/58f9b335760da3da068bd3b5/html5/thumbnails/104.jpg)
More Information
• My blog• http://www.davsclaus.com
• Apache Camel 3rd party blogs/articles/etc• http://camel.apache.org/articles
• Camel videos• https://vimeo.com/tag:apachecamel
• Best What is Camel article• https://dzone.com/articles/open-source-int
egration-apache
Also videos on Youtube
@davsclausdavsclaus