SlideShare a Scribd company logo
1 of 33
Download to read offline
A Progress Software
Company
Introduction to
Apache Camel
Bosanac Dejan
January 2011
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
2
About me
 Bosanac Dejan
 Senior Software Engineer at FUSESource - http://
fusesource.com
 Apache ActiveMQ committer and PMC member
 Co-author of ActiveMQ in Action
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
3
What is Apache Camel?
Apache Camel is a powerful Open Source Integration
Framework based on known Enterprise Integration Patterns
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
4
Why Apache Camel?
 Integration can be messy - variety of protocols and
data formats
 Framework hides all complexity so you can focus on
your business logic
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
5
Route example
Content Based Router
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
6
Content based Router - XML
<camelContext>
<route>
<from uri="activemq:NewOrders"/>
<choice>
<when>
<xpath>/order/product = 'widget'</xpath>
<to uri="activemq:Orders.Widgets"/>
</when>
<otherwise>
<to uri="activemq:Orders.Gadgets"/>
</otherwise>
</choice>
</route>
</camelContext>
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
7
Content Based Router - Java DSL
from("activemq:NewOrders")
.choice()
.when().xpath(“/order/product = 'widget'”)
.to(“activemq:Orders.Widget”)
.otherwise()
.to(“activemq:Orders.Gadget”);
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
8
50 Enterprise Integration Patterns
http://camel.apache.org/enterprise-integration-patterns.html
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
9
80 Components
activemq cxf flatpack jasypt
activemq-journal cxfrs freemarker javaspace
amqp dataset ftp/ftps/sftp jbi
atom db4o gae jcr
bean direct hdfs jdbc
bean validation ejb hibernate jetty
browse esper hl7 jms
cache event http jmx
cometd exec ibatis jpa
crypto file irc jt/400
http://camel.apache.org/components.html
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
10
80 Components
language properties seda stream
ldap quartz servlet string-template
mail/imap/pop3 quickfix sip test
mina ref smooks timer
mock restlet smpp validation
msv rmi snmp velocity
nagios rnc spring-integration vm
netty rng spring-security xmpp
nmr rss spring-ws xquery
printer scalate sql xslt
http://camel.apache.org/components.html
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
19 Data Formats
11
bindy protobuf
castor serialization
csv soap
crypto syslog
dozer tidy markup
flatpack xml beans
gzip xml security
hl7 xstream
jaxb zip
json
http://camel.apache.org/data-format.html
from("activemq:QueueWithJavaObjects”)
.marshal().jaxb()
.to("mq:QueueWithXmlMessages");
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
14 Expression Languaes
12
BeanShell PHP
EL Python
Groovy Ruby
JavaScript Simple
JSR 223 SQL
OGNL XPath
MVEL XQuery
http://camel.apache.org/languages.html
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
DSL in 3 programming Languages
13
XML
<route>
<from ref="A"/>
<filter>
<xpath>/quote/product = ‘widget’</xpath>
<to ref="B"/>
</filter>
</route>
Java
from(A).filter(isWidget).to(B);
Scala
from(A) filter(isWidget) --> B
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Running Camel
14
 Deployment Strategy
• No container dependency
• Lightweight
• Embeddable
 Deployment Options
• Standalone
• WAR
• Spring
• J2EE
• JBI
• OSGi
• Cloud
Known Containers
Apache ServiceMix
Apache ActiveMQ
Apache Tomcat
Jetty
JBoss
IBM WebSphere
Oracle WebLogic
Oracle OC4j
Glassfish
Google App Engine
... others
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Running Camel
15
CamelContext context = new DefaultCamelContext();
context.addRoutes(new MyRouteBuilder());
context.start();
<camelContext>
<package>com.acme</package>
</camelContext>
Spring Application
Java Application
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Managing Camel
 JMX API
 REST API
16
Fuse HQ SOA management and monitoring system based on
Hyperic HQ Enterprise
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Developer Web Console
17
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
FuseSource Rider
18
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Rider Auto Parts Example by Jonathan Anstey
19
http://architects.dzone.com/articles/apache-camel-integration
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Rider Auto Parts Example by Jonathan Anstey
20
http://architects.dzone.com/articles/apache-camel-integration
1
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Rider Auto Parts Example by Jonathan Anstey
21
http://architects.dzone.com/articles/apache-camel-integration
2
1
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Rider Auto Parts Example by Jonathan Anstey
22
http://architects.dzone.com/articles/apache-camel-integration
1
2
3
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Rider Example - Spring Configuration
<broker xmlns="http://activemq.apache.org/schema/core" persistent="false">
<transportConnectors>
<transportConnectoruri="tcp://localhost:61616" />
</transportConnectors>
</broker>
<bean id="jms" class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="brokerURL" value="tcp://localhost:61616"/>
</bean>
<bean id="helper" class="org.fusesource.camel.OrderHelper"/>
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<package>org.fusesource.camel</package>
</camelContext>
 
23
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Rider Example - Route 1
24
public class Route1 extends RouteBuilder {
public void configure() throws Exception {
from("ftp:user@rider.com?password=secret")
.to("activemq:queue:incoming");
}
}
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Rider Example - Route 2
25
public class Route2 extends RouteBuilder {
public void configure() throws Exception {
from("jetty:http://localhost:8080/orders")
.inOnly("activemq:queue:incoming")
.transform().constant("OK");
}
}
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Rider Example - Route 3
26
public class Route3 extends RouteBuilder {
public void configure() throws Exception {
JaxbDataFormat jaxb = new JaxbDataFormat("com.rider");
BindyDataFormat bindy = new BindyDataFormat("com.rider");
from("activemq:queue:incoming")
.convertBodyTo(String.class)
.choice()
.when().method("helper”, "isXml")
.unmarshal(jaxb)
.to("activemq:queue:order")
.when().method("helper”, "isCsv")
.unmarshal(bindy)
.to("activemq:queue:order")
}
}
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Rider Example - Data Samples
27
XML Data
<?xml version="1.0" encoding="UTF-8"?>
<order name="motor" amount="1"/>
CSV Data
"name", "amount"
"brake pad", "2"
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Rider Example - Order helper
28
public class OrderHelper {
public boolean isCsv(String body) {
return !body.contains("<?xml");
}
 
public boolean isXml(String body) {
return body.contains("<?xml");
}
}
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
Rider Example - Order Bean
29
@XmlAccessorType(XmlAccessType.FIELD)
public class Order implements Serializable {
@XmlAttribute
private String name;
@XmlAttribute
private int amount;
 
public Order() {
}
 
public Order(String name, int amount) {
this.name = name;
this.amount = amount;
}
 
@Override
public String toString() {
return "Order[" + name + " , " + amount + "]";
}
}
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
What else is there?
 Error handling
 EIP annotations
 Test Kit
 Transactions
 Interceptors
 Security
 ...
30
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
More Information
31
 Where do I get more information?
 Camel website: http://camel.apache.org
 Camel article: http://architects.dzone.com/articles/apache-camel-
integration
 Camel in Action book: http://manning.com/ibsen
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
32
Blog:
http://www.nighttale.net/
Twitter:
http://twitter.com/dejanb
http://twitter.com/fusenews
© 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software
Company
32
Questions?
Blog:
http://www.nighttale.net/
Twitter:
http://twitter.com/dejanb
http://twitter.com/fusenews

More Related Content

Viewers also liked

Trainer storage project DT
Trainer storage project DTTrainer storage project DT
Trainer storage project DTCalum1997
 
Community and Cultural Connections
Community and Cultural ConnectionsCommunity and Cultural Connections
Community and Cultural ConnectionsShashanka Das
 
graphic my
graphic mygraphic my
graphic myWIAM B
 
CURRICULUM OF ANTONIO OCANA
CURRICULUM OF ANTONIO OCANACURRICULUM OF ANTONIO OCANA
CURRICULUM OF ANTONIO OCANAAntonio Oca
 
TopTrendy_clanok
TopTrendy_clanokTopTrendy_clanok
TopTrendy_clanokRoman Dano
 
organisatiebeheersing en informatiebeheersing in de Stad Diest
organisatiebeheersing en informatiebeheersing in de Stad Diest organisatiebeheersing en informatiebeheersing in de Stad Diest
organisatiebeheersing en informatiebeheersing in de Stad Diest Petra Vanhoutte
 
The 5 second rule and its applicability to ux
The 5 second rule and its applicability to uxThe 5 second rule and its applicability to ux
The 5 second rule and its applicability to uxManuswath K.B
 
Rutinas de pensamiento
Rutinas de pensamientoRutinas de pensamiento
Rutinas de pensamientoCEDEC
 
Piet Mondrian for kids
Piet Mondrian for kidsPiet Mondrian for kids
Piet Mondrian for kidsnivaca2
 

Viewers also liked (13)

Present
PresentPresent
Present
 
Trainer storage project DT
Trainer storage project DTTrainer storage project DT
Trainer storage project DT
 
Community and Cultural Connections
Community and Cultural ConnectionsCommunity and Cultural Connections
Community and Cultural Connections
 
Milan Pilous_CV
Milan Pilous_CVMilan Pilous_CV
Milan Pilous_CV
 
graphic my
graphic mygraphic my
graphic my
 
CURRICULUM OF ANTONIO OCANA
CURRICULUM OF ANTONIO OCANACURRICULUM OF ANTONIO OCANA
CURRICULUM OF ANTONIO OCANA
 
TopTrendy_clanok
TopTrendy_clanokTopTrendy_clanok
TopTrendy_clanok
 
L'EDAT MODERNA
L'EDAT MODERNAL'EDAT MODERNA
L'EDAT MODERNA
 
organisatiebeheersing en informatiebeheersing in de Stad Diest
organisatiebeheersing en informatiebeheersing in de Stad Diest organisatiebeheersing en informatiebeheersing in de Stad Diest
organisatiebeheersing en informatiebeheersing in de Stad Diest
 
Skill development
Skill developmentSkill development
Skill development
 
The 5 second rule and its applicability to ux
The 5 second rule and its applicability to uxThe 5 second rule and its applicability to ux
The 5 second rule and its applicability to ux
 
Rutinas de pensamiento
Rutinas de pensamientoRutinas de pensamiento
Rutinas de pensamiento
 
Piet Mondrian for kids
Piet Mondrian for kidsPiet Mondrian for kids
Piet Mondrian for kids
 

Similar to Introductiontoapachecamel 110131060022-phpapp01

Extending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsExtending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsIBM UrbanCode Products
 
Progress application server for openedge best practices - PUG Baltic Annual C...
Progress application server for openedge best practices - PUG Baltic Annual C...Progress application server for openedge best practices - PUG Baltic Annual C...
Progress application server for openedge best practices - PUG Baltic Annual C...Alen Leit
 
ApacheCon NA 2010 - Building Apps with Apache Tuscany
ApacheCon NA 2010 - Building Apps with Apache TuscanyApacheCon NA 2010 - Building Apps with Apache Tuscany
ApacheCon NA 2010 - Building Apps with Apache TuscanyJean-Sebastien Delfino
 
Introduction to Apache Camel
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache CamelFuseSource.com
 
점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정Arawn Park
 
Xke - Introduction to Apache Camel
Xke - Introduction to Apache CamelXke - Introduction to Apache Camel
Xke - Introduction to Apache CamelAlexis Kinsella
 
Building apps with tuscany
Building apps with tuscanyBuilding apps with tuscany
Building apps with tuscanyLuciano Resende
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 
Ato2019 weave-services-istio
Ato2019 weave-services-istioAto2019 weave-services-istio
Ato2019 weave-services-istioLin Sun
 
Weave Your Microservices with Istio
Weave Your Microservices with IstioWeave Your Microservices with Istio
Weave Your Microservices with IstioAll Things Open
 
All Things Open 2019 weave-services-istio
All Things Open 2019 weave-services-istioAll Things Open 2019 weave-services-istio
All Things Open 2019 weave-services-istioLin Sun
 
Java vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJava vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJAXLondon_Conference
 
ServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBIServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBIGert Vanthienen
 
Cwin16 tls-a micro-service deployment - v1.0
Cwin16 tls-a micro-service deployment - v1.0Cwin16 tls-a micro-service deployment - v1.0
Cwin16 tls-a micro-service deployment - v1.0Capgemini
 
JAX London 2015: Java vs Nodejs
JAX London 2015: Java vs NodejsJAX London 2015: Java vs Nodejs
JAX London 2015: Java vs NodejsChris Bailey
 
How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case Kai Sasaki
 
Jax WS JAX RS and Java Web Apps with WSO2 Platform
Jax WS JAX RS and Java Web Apps with WSO2 PlatformJax WS JAX RS and Java Web Apps with WSO2 Platform
Jax WS JAX RS and Java Web Apps with WSO2 PlatformWSO2
 

Similar to Introductiontoapachecamel 110131060022-phpapp01 (20)

Extending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsExtending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with Plugins
 
Progress application server for openedge best practices - PUG Baltic Annual C...
Progress application server for openedge best practices - PUG Baltic Annual C...Progress application server for openedge best practices - PUG Baltic Annual C...
Progress application server for openedge best practices - PUG Baltic Annual C...
 
ApacheCon NA 2010 - Building Apps with Apache Tuscany
ApacheCon NA 2010 - Building Apps with Apache TuscanyApacheCon NA 2010 - Building Apps with Apache Tuscany
ApacheCon NA 2010 - Building Apps with Apache Tuscany
 
Introduction to Apache Camel
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache Camel
 
점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정
 
Xke - Introduction to Apache Camel
Xke - Introduction to Apache CamelXke - Introduction to Apache Camel
Xke - Introduction to Apache Camel
 
Camel_From_The_Field
Camel_From_The_FieldCamel_From_The_Field
Camel_From_The_Field
 
Building apps with tuscany
Building apps with tuscanyBuilding apps with tuscany
Building apps with tuscany
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
Ato2019 weave-services-istio
Ato2019 weave-services-istioAto2019 weave-services-istio
Ato2019 weave-services-istio
 
Weave Your Microservices with Istio
Weave Your Microservices with IstioWeave Your Microservices with Istio
Weave Your Microservices with Istio
 
All Things Open 2019 weave-services-istio
All Things Open 2019 weave-services-istioAll Things Open 2019 weave-services-istio
All Things Open 2019 weave-services-istio
 
Java vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJava vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris Bailey
 
ServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBIServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBI
 
Node.js Tools Ecosystem
Node.js Tools EcosystemNode.js Tools Ecosystem
Node.js Tools Ecosystem
 
Cwin16 tls-a micro-service deployment - v1.0
Cwin16 tls-a micro-service deployment - v1.0Cwin16 tls-a micro-service deployment - v1.0
Cwin16 tls-a micro-service deployment - v1.0
 
JAX London 2015: Java vs Nodejs
JAX London 2015: Java vs NodejsJAX London 2015: Java vs Nodejs
JAX London 2015: Java vs Nodejs
 
Mashups
MashupsMashups
Mashups
 
How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case
 
Jax WS JAX RS and Java Web Apps with WSO2 Platform
Jax WS JAX RS and Java Web Apps with WSO2 PlatformJax WS JAX RS and Java Web Apps with WSO2 Platform
Jax WS JAX RS and Java Web Apps with WSO2 Platform
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Introductiontoapachecamel 110131060022-phpapp01

  • 1. A Progress Software Company Introduction to Apache Camel Bosanac Dejan January 2011
  • 2. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 2 About me  Bosanac Dejan  Senior Software Engineer at FUSESource - http:// fusesource.com  Apache ActiveMQ committer and PMC member  Co-author of ActiveMQ in Action
  • 3. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 3 What is Apache Camel? Apache Camel is a powerful Open Source Integration Framework based on known Enterprise Integration Patterns
  • 4. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 4 Why Apache Camel?  Integration can be messy - variety of protocols and data formats  Framework hides all complexity so you can focus on your business logic
  • 5. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 5 Route example Content Based Router
  • 6. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 6 Content based Router - XML <camelContext> <route> <from uri="activemq:NewOrders"/> <choice> <when> <xpath>/order/product = 'widget'</xpath> <to uri="activemq:Orders.Widgets"/> </when> <otherwise> <to uri="activemq:Orders.Gadgets"/> </otherwise> </choice> </route> </camelContext>
  • 7. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 7 Content Based Router - Java DSL from("activemq:NewOrders") .choice() .when().xpath(“/order/product = 'widget'”) .to(“activemq:Orders.Widget”) .otherwise() .to(“activemq:Orders.Gadget”);
  • 8. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 8 50 Enterprise Integration Patterns http://camel.apache.org/enterprise-integration-patterns.html
  • 9. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 9 80 Components activemq cxf flatpack jasypt activemq-journal cxfrs freemarker javaspace amqp dataset ftp/ftps/sftp jbi atom db4o gae jcr bean direct hdfs jdbc bean validation ejb hibernate jetty browse esper hl7 jms cache event http jmx cometd exec ibatis jpa crypto file irc jt/400 http://camel.apache.org/components.html
  • 10. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 10 80 Components language properties seda stream ldap quartz servlet string-template mail/imap/pop3 quickfix sip test mina ref smooks timer mock restlet smpp validation msv rmi snmp velocity nagios rnc spring-integration vm netty rng spring-security xmpp nmr rss spring-ws xquery printer scalate sql xslt http://camel.apache.org/components.html
  • 11. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 19 Data Formats 11 bindy protobuf castor serialization csv soap crypto syslog dozer tidy markup flatpack xml beans gzip xml security hl7 xstream jaxb zip json http://camel.apache.org/data-format.html from("activemq:QueueWithJavaObjects”) .marshal().jaxb() .to("mq:QueueWithXmlMessages");
  • 12. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 14 Expression Languaes 12 BeanShell PHP EL Python Groovy Ruby JavaScript Simple JSR 223 SQL OGNL XPath MVEL XQuery http://camel.apache.org/languages.html
  • 13. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company DSL in 3 programming Languages 13 XML <route> <from ref="A"/> <filter> <xpath>/quote/product = ‘widget’</xpath> <to ref="B"/> </filter> </route> Java from(A).filter(isWidget).to(B); Scala from(A) filter(isWidget) --> B
  • 14. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Running Camel 14  Deployment Strategy • No container dependency • Lightweight • Embeddable  Deployment Options • Standalone • WAR • Spring • J2EE • JBI • OSGi • Cloud Known Containers Apache ServiceMix Apache ActiveMQ Apache Tomcat Jetty JBoss IBM WebSphere Oracle WebLogic Oracle OC4j Glassfish Google App Engine ... others
  • 15. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Running Camel 15 CamelContext context = new DefaultCamelContext(); context.addRoutes(new MyRouteBuilder()); context.start(); <camelContext> <package>com.acme</package> </camelContext> Spring Application Java Application
  • 16. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Managing Camel  JMX API  REST API 16 Fuse HQ SOA management and monitoring system based on Hyperic HQ Enterprise
  • 17. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Developer Web Console 17
  • 18. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company FuseSource Rider 18
  • 19. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Rider Auto Parts Example by Jonathan Anstey 19 http://architects.dzone.com/articles/apache-camel-integration
  • 20. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Rider Auto Parts Example by Jonathan Anstey 20 http://architects.dzone.com/articles/apache-camel-integration 1
  • 21. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Rider Auto Parts Example by Jonathan Anstey 21 http://architects.dzone.com/articles/apache-camel-integration 2 1
  • 22. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Rider Auto Parts Example by Jonathan Anstey 22 http://architects.dzone.com/articles/apache-camel-integration 1 2 3
  • 23. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Rider Example - Spring Configuration <broker xmlns="http://activemq.apache.org/schema/core" persistent="false"> <transportConnectors> <transportConnectoruri="tcp://localhost:61616" /> </transportConnectors> </broker> <bean id="jms" class="org.apache.activemq.camel.component.ActiveMQComponent"> <property name="brokerURL" value="tcp://localhost:61616"/> </bean> <bean id="helper" class="org.fusesource.camel.OrderHelper"/> <camelContext xmlns="http://activemq.apache.org/camel/schema/spring"> <package>org.fusesource.camel</package> </camelContext>   23
  • 24. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Rider Example - Route 1 24 public class Route1 extends RouteBuilder { public void configure() throws Exception { from("ftp:user@rider.com?password=secret") .to("activemq:queue:incoming"); } }
  • 25. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Rider Example - Route 2 25 public class Route2 extends RouteBuilder { public void configure() throws Exception { from("jetty:http://localhost:8080/orders") .inOnly("activemq:queue:incoming") .transform().constant("OK"); } }
  • 26. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Rider Example - Route 3 26 public class Route3 extends RouteBuilder { public void configure() throws Exception { JaxbDataFormat jaxb = new JaxbDataFormat("com.rider"); BindyDataFormat bindy = new BindyDataFormat("com.rider"); from("activemq:queue:incoming") .convertBodyTo(String.class) .choice() .when().method("helper”, "isXml") .unmarshal(jaxb) .to("activemq:queue:order") .when().method("helper”, "isCsv") .unmarshal(bindy) .to("activemq:queue:order") } }
  • 27. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Rider Example - Data Samples 27 XML Data <?xml version="1.0" encoding="UTF-8"?> <order name="motor" amount="1"/> CSV Data "name", "amount" "brake pad", "2"
  • 28. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Rider Example - Order helper 28 public class OrderHelper { public boolean isCsv(String body) { return !body.contains("<?xml"); }   public boolean isXml(String body) { return body.contains("<?xml"); } }
  • 29. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company Rider Example - Order Bean 29 @XmlAccessorType(XmlAccessType.FIELD) public class Order implements Serializable { @XmlAttribute private String name; @XmlAttribute private int amount;   public Order() { }   public Order(String name, int amount) { this.name = name; this.amount = amount; }   @Override public String toString() { return "Order[" + name + " , " + amount + "]"; } }
  • 30. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company What else is there?  Error handling  EIP annotations  Test Kit  Transactions  Interceptors  Security  ... 30
  • 31. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company More Information 31  Where do I get more information?  Camel website: http://camel.apache.org  Camel article: http://architects.dzone.com/articles/apache-camel- integration  Camel in Action book: http://manning.com/ibsen
  • 32. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 32 Blog: http://www.nighttale.net/ Twitter: http://twitter.com/dejanb http://twitter.com/fusenews
  • 33. © 2010 FuseSource, a Progress Software Company. All rights reserved. A Progress Software Company 32 Questions? Blog: http://www.nighttale.net/ Twitter: http://twitter.com/dejanb http://twitter.com/fusenews