SlideShare uma empresa Scribd logo
1 de 66
PUBLIC PRESENTATION | CLAUS IBSEN1
Using Apache Camel connectors for
external connectivity
Claus Ibsen
Principal Software Engineer, Red Hat
May 2013
PUBLIC PRESENTATION | CLAUS IBSEN2
PUBLIC PRESENTATION | CLAUS IBSEN3
PUBLIC PRESENTATION | CLAUS IBSEN4
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 IBSEN5
Agenda
● A little Example
● Understanding Components
● Essential Components
● Creating new Components
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN6
A Little Example
● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN7
A Little Example
PUBLIC PRESENTATION | CLAUS IBSEN8
A Little Example
● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN9
A Little Example
● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN10
A Little Example
● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN11
A Little Example
● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN12
A Little Example
● File Copier Example (in XML)
PUBLIC PRESENTATION | CLAUS IBSEN13
A Little Example
● File to FTP Example
Files is coped from data/inbox
to a remote FTP server
PUBLIC PRESENTATION | CLAUS IBSEN14
A Little Example
● File to FTP Example
How to write this in pure Java code ???
PUBLIC PRESENTATION | CLAUS IBSEN15
A Little Example
● File to FTP Example
Easy with Camel
Just use FTP component
PUBLIC PRESENTATION | CLAUS IBSEN16
A Little Example
● Camel's Architecture
PUBLIC PRESENTATION | CLAUS IBSEN17
A Little Example
120+ Components
PUBLIC PRESENTATION | CLAUS IBSEN18
A Little Example
120+ Components
PUBLIC PRESENTATION | CLAUS IBSEN19
A Little Example
In fact we have 139 in latest release ...
davsclaus:~/Downloads/apache-camel-2.11.0/lib$ ls camel* | wc -l
139
PUBLIC PRESENTATION | CLAUS IBSEN20
A Little Example
… All components on website
PUBLIC PRESENTATION | CLAUS IBSEN21
A Little Example
● Summary
● Components for connectivity
● Camel routes with components and EIPs
● Components easy to configure
● A lot of components
● Very composeable
● Learn Once – Can use 'em All
PUBLIC PRESENTATION | CLAUS IBSEN22
Agenda
● A little Example
● Understanding Components
● Essential Components
● Creating new Components
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN23
Understanding Components
● Facilitate messaging for connectivity
PUBLIC PRESENTATION | CLAUS IBSEN24
Understanding Components
● Facilitate messaging for connectivity
Producer Consumer
PUBLIC PRESENTATION | CLAUS IBSEN25
Understanding Components
● … using endpoints via message channels
PUBLIC PRESENTATION | CLAUS IBSEN26
Understanding Components
● Component is a factory for creating endpoints
● … and endpoint factory for creating producer and/or
consumers
PUBLIC PRESENTATION | CLAUS IBSEN27
Understanding Components
● Component auto discovered
● ... or manually added to CamelContext
PUBLIC PRESENTATION | CLAUS IBSEN28
Understanding Components
● Endpoints can be configured using URIs
● … or for example using Java code
PUBLIC PRESENTATION | CLAUS IBSEN29
Understanding Components
● Revisit File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN30
Understanding Components
● Revisit File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN31
Understanding Components
● What is a Message in Camel?
PUBLIC PRESENTATION | CLAUS IBSEN32
Understanding Components
● … and contained in an Exchange during routing
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
PUBLIC PRESENTATION | CLAUS IBSEN33
Agenda
● A little Example
● Understanding Components
● Essential Components
● Creating new Components
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN34
Essential Components
● Camel Essential Components Reference Card
http://refcardz.dzone.com/refcardz/essential-camel-components
PUBLIC PRESENTATION | CLAUS IBSEN35
Essential Components
● Direct Component
PUBLIC PRESENTATION | CLAUS IBSEN36
Essential Components
● SEDA Component
● … beware of InOut over SEDA
(producer will wait for reply default)
PUBLIC PRESENTATION | CLAUS IBSEN37
Essential Components
● Bean Component
● … and use <bean> to declare the bean
(standard Spring)
PUBLIC PRESENTATION | CLAUS IBSEN38
Essential Components
● … Camel adapts to bean method signature
… using bean parameter binding
● http://camel.apache.org/bean-binding.html
● http://camel.apache.org/parameter-binding-annotations.html
PUBLIC PRESENTATION | CLAUS IBSEN39
Essential Components
● Log Component
● Log EIP (human readable message)
PUBLIC PRESENTATION | CLAUS IBSEN40
Essential Components
● File and FTP Components
● Exec Component
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
PUBLIC PRESENTATION | CLAUS IBSEN41
Essential Components
● ActiveMQ / JMS
Take time to read about JMS at:
http://camel.apache.org/jms
PUBLIC PRESENTATION | CLAUS IBSEN42
Essential Components
● ActiveMQ / JMS (cont.)
If using transactions with JMS
make sure to read about
cache levels at:
http://camel.apache.org/jms
http://camel.apache.org/activemq
PUBLIC PRESENTATION | CLAUS IBSEN43
Essential Components
● SQL
● … uri is SQL, and body is SQL parameters.
● Externalize queries in .properties file
http://camel.apache.org/sql-example.html
PUBLIC PRESENTATION | CLAUS IBSEN44
Essential Components
● JDBC
● … body is SQL and result is List<Map>
(eg like ResultSet)
Improvement on the way: https://issues.apache.org/jira/browse/CAMEL-6367
http://camel.apache.org/sql-example.html
PUBLIC PRESENTATION | CLAUS IBSEN45
Essential Components
● Other JDBC Components
● JPA
● Hibernate
● MyBatis
http://camel.apache.org/sql-example.html
PUBLIC PRESENTATION | CLAUS IBSEN46
Essential Components
● HTTP/WS/Rest Components
● Jetty / Servlet
● HTTP / HTTP4 / Jetty / AHC
● CXF / Spring-WS
● CXF-RS / Restlet
http://camel.apache.org/sql-example.html
PUBLIC PRESENTATION | CLAUS IBSEN47
Essential Components
● TCP/UDP Components
● Mina / Mina2
● Netty
http://camel.apache.org/sql-example.html
PUBLIC PRESENTATION | CLAUS IBSEN48
Agenda
● A little Example
● Understanding Components
● Essential Components
● Creating new Components
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN49
Creating new Camel Components
● The big picture
PUBLIC PRESENTATION | CLAUS IBSEN50
Creating new Camel Components
PUBLIC PRESENTATION | CLAUS IBSEN51
Creating new Camel Components
PUBLIC PRESENTATION | CLAUS IBSEN52
Creating new Camel Components
1. execute this maven command
2. type camel to filter only Camel archetypes
3. type number to select “camel-archetype-component” (in this ex its 5)3. type number to select “camel-archetype-component” (in this ex its 5)
4. select the Camel version to use
Geocoder = Java component name
(must be first letter in upper case)
geocoder = Camel component name
(must be lower-case)
PUBLIC PRESENTATION | CLAUS IBSEN53
Creating new Camel Components
●
Add 3rd
party library to pom.xml file
PUBLIC PRESENTATION | CLAUS IBSEN54
Creating new Camel Components
● Auto discover component
file in META-INF classpath
PUBLIC PRESENTATION | CLAUS IBSEN55
Creating new Camel Components
Options as getter/setter
Consumer is not supported
PUBLIC PRESENTATION | CLAUS IBSEN56
Creating new Camel Components
PUBLIC PRESENTATION | CLAUS IBSEN57
Creating new Camel Components
PUBLIC PRESENTATION | CLAUS IBSEN58
Creating new Camel Components
● Running unit test ...
PUBLIC PRESENTATION | CLAUS IBSEN59
Agenda
● A little Example
● Understanding Components
● Essential Components
● Creating new Components
● Q and A
PUBLIC PRESENTATION | CLAUS IBSEN60
Where do I get more information?
● Where can I get the slides?
http://www.slideshare.net/davsclaus
PUBLIC PRESENTATION | CLAUS IBSEN61
Where do I get more information?
● CamelOne 2013 Conference
http://www.camelone.com
PUBLIC PRESENTATION | CLAUS IBSEN62
Where do I get more information?
● Getting started with Apache Camel Webinar
● http://fusesource.com
Click on webinars menu
Building superior …
PUBLIC PRESENTATION | CLAUS IBSEN63
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 IBSEN64
Where do I get more information?
● Camel Essential Components Reference Card
http://refcardz.dzone.com/refcardz/essential-camel-components
PUBLIC PRESENTATION | CLAUS IBSEN65
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 IBSEN66
Any Questions ?
● Contact
● EMail: cibsen@redhat.com
● Twitter: @davsclaus
● Blog: http://davsclaus.com
● Linkedin: http://www.linkedin.com/in/davsclaus

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Getting Started with Apache Camel - Malmo JUG - March 2013
Getting Started with Apache Camel - Malmo JUG - March 2013Getting Started with Apache Camel - Malmo JUG - March 2013
Getting Started with Apache Camel - Malmo JUG - March 2013
 
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containers
 
Getting started with Apache Camel - Javagruppen Copenhagen - April 2014
Getting started with Apache Camel - Javagruppen Copenhagen - April 2014Getting started with Apache Camel - Javagruppen Copenhagen - April 2014
Getting started with Apache Camel - Javagruppen Copenhagen - April 2014
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache Camel
 
Enterprise Integration Patterns with Apache Camel
Enterprise Integration Patterns with Apache CamelEnterprise Integration Patterns with Apache Camel
Enterprise Integration Patterns with Apache Camel
 
Apache Camel workshop at BarcelonaJUG in January 2014
Apache Camel workshop at BarcelonaJUG in January 2014Apache Camel workshop at BarcelonaJUG in January 2014
Apache Camel workshop at BarcelonaJUG in January 2014
 
Integration made easy with Apache Camel
Integration made easy with Apache CamelIntegration made easy with Apache Camel
Integration made easy with Apache Camel
 
Camel Day Italy 2021 - What's new in Camel 3
Camel Day Italy 2021 - What's new in Camel 3Camel Day Italy 2021 - What's new in Camel 3
Camel Day Italy 2021 - What's new in Camel 3
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containers
 
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
 
Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2
 
Serverless integration with Knative and Apache Camel on Kubernetes
Serverless integration with Knative and Apache Camel on KubernetesServerless integration with Knative and Apache Camel on Kubernetes
Serverless integration with Knative and Apache Camel on Kubernetes
 
Event Driven Architecture with Apache Camel
Event Driven Architecture with Apache CamelEvent Driven Architecture with Apache Camel
Event Driven Architecture with Apache Camel
 
Apache Camel K - Fredericia
Apache Camel K - FredericiaApache Camel K - Fredericia
Apache Camel K - Fredericia
 
Integrating systems in the age of Quarkus and Camel
Integrating systems in the age of Quarkus and CamelIntegrating systems in the age of Quarkus and Camel
Integrating systems in the age of Quarkus and Camel
 
Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...
 
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
 
Apache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whaleApache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whale
 
JEEConf 2018 - Camel microservices with Spring Boot and Kubernetes
JEEConf 2018 - Camel microservices with Spring Boot and KubernetesJEEConf 2018 - Camel microservices with Spring Boot and Kubernetes
JEEConf 2018 - Camel microservices with Spring Boot and Kubernetes
 

Semelhante a Using Apache Camel connectors for external connectivity

PowerShell for the Anxious ITPro
PowerShell for the Anxious ITProPowerShell for the Anxious ITPro
PowerShell for the Anxious ITPro
Jason Himmelstein
 

Semelhante a Using Apache Camel connectors for external connectivity (20)

Kubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slidesKubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slides
 
AtoM feature development
AtoM feature developmentAtoM feature development
AtoM feature development
 
Improving the Accumulo User Experience
 Improving the Accumulo User Experience Improving the Accumulo User Experience
Improving the Accumulo User Experience
 
Tutorial contributing to nf-core
Tutorial contributing to nf-coreTutorial contributing to nf-core
Tutorial contributing to nf-core
 
Integrating microservices with apache camel on kubernetes
Integrating microservices with apache camel on kubernetesIntegrating microservices with apache camel on kubernetes
Integrating microservices with apache camel on kubernetes
 
Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...
Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...
Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...
 
Integration using Apache Camel and Groovy
Integration using Apache Camel and GroovyIntegration using Apache Camel and Groovy
Integration using Apache Camel and Groovy
 
Serverless - DevOps Lessons Learned From Production
Serverless - DevOps Lessons Learned From ProductionServerless - DevOps Lessons Learned From Production
Serverless - DevOps Lessons Learned From Production
 
reBuy on Kubernetes
reBuy on KubernetesreBuy on Kubernetes
reBuy on Kubernetes
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Feature Flags. Reducing risks during shipping changes/
Feature Flags. Reducing risks during shipping changes/Feature Flags. Reducing risks during shipping changes/
Feature Flags. Reducing risks during shipping changes/
 
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений" Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
 
PowerShell for the Anxious ITPro
PowerShell for the Anxious ITProPowerShell for the Anxious ITPro
PowerShell for the Anxious ITPro
 
CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton
 
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring BootBuilding APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
 
Modules and artifacts in NPM by Anton Cherednikov
Modules and artifacts in NPM by Anton CherednikovModules and artifacts in NPM by Anton Cherednikov
Modules and artifacts in NPM by Anton Cherednikov
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 
Kubeadm Deep Dive (Kubecon Seattle 2018)
Kubeadm Deep Dive (Kubecon Seattle 2018)Kubeadm Deep Dive (Kubecon Seattle 2018)
Kubeadm Deep Dive (Kubecon Seattle 2018)
 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
 
EuroPython 2013 - Python3 TurboGears Training
EuroPython 2013 - Python3 TurboGears TrainingEuroPython 2013 - Python3 TurboGears Training
EuroPython 2013 - Python3 TurboGears Training
 

Mais de Claus Ibsen

Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Claus Ibsen
 
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on KubernetesRiga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Claus Ibsen
 

Mais de Claus Ibsen (13)

Low Code Integration with Apache Camel.pdf
Low Code Integration with Apache Camel.pdfLow Code Integration with Apache Camel.pdf
Low Code Integration with Apache Camel.pdf
 
Camel JBang - Quarkus Insights.pdf
Camel JBang - Quarkus Insights.pdfCamel JBang - Quarkus Insights.pdf
Camel JBang - Quarkus Insights.pdf
 
DevNation Live 2020 - What's new with Apache Camel 3
DevNation Live 2020 - What's new with Apache Camel 3DevNation Live 2020 - What's new with Apache Camel 3
DevNation Live 2020 - What's new with Apache Camel 3
 
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integrationSouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
 
Apache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel QuarkusApache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel Quarkus
 
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
 
State of integration with Apache Camel (ApacheCon 2019)
State of integration with Apache Camel (ApacheCon 2019)State of integration with Apache Camel (ApacheCon 2019)
State of integration with Apache Camel (ApacheCon 2019)
 
Apache Camel K - Copenhagen
Apache Camel K - CopenhagenApache Camel K - Copenhagen
Apache Camel K - Copenhagen
 
Camel riders in the cloud
Camel riders in the cloudCamel riders in the cloud
Camel riders in the cloud
 
Introduction to Apache Camel
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache Camel
 
ApacheCon EU 2016 - Apache Camel the integration library
ApacheCon EU 2016 - Apache Camel the integration libraryApacheCon EU 2016 - Apache Camel the integration library
ApacheCon EU 2016 - Apache Camel the integration library
 
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on KubernetesRiga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
 
Apache Camel Introduction & What's in the box
Apache Camel Introduction & What's in the boxApache Camel Introduction & What's in the box
Apache Camel Introduction & What's in the box
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Using Apache Camel connectors for external connectivity

  • 1. PUBLIC PRESENTATION | CLAUS IBSEN1 Using Apache Camel connectors for external connectivity Claus Ibsen Principal Software Engineer, Red Hat May 2013
  • 2. PUBLIC PRESENTATION | CLAUS IBSEN2
  • 3. PUBLIC PRESENTATION | CLAUS IBSEN3
  • 4. PUBLIC PRESENTATION | CLAUS IBSEN4 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
  • 5. PUBLIC PRESENTATION | CLAUS IBSEN5 Agenda ● A little Example ● Understanding Components ● Essential Components ● Creating new Components ● Q and A
  • 6. PUBLIC PRESENTATION | CLAUS IBSEN6 A Little Example ● File Copier Example
  • 7. PUBLIC PRESENTATION | CLAUS IBSEN7 A Little Example
  • 8. PUBLIC PRESENTATION | CLAUS IBSEN8 A Little Example ● File Copier Example
  • 9. PUBLIC PRESENTATION | CLAUS IBSEN9 A Little Example ● File Copier Example
  • 10. PUBLIC PRESENTATION | CLAUS IBSEN10 A Little Example ● File Copier Example
  • 11. PUBLIC PRESENTATION | CLAUS IBSEN11 A Little Example ● File Copier Example
  • 12. PUBLIC PRESENTATION | CLAUS IBSEN12 A Little Example ● File Copier Example (in XML)
  • 13. PUBLIC PRESENTATION | CLAUS IBSEN13 A Little Example ● File to FTP Example Files is coped from data/inbox to a remote FTP server
  • 14. PUBLIC PRESENTATION | CLAUS IBSEN14 A Little Example ● File to FTP Example How to write this in pure Java code ???
  • 15. PUBLIC PRESENTATION | CLAUS IBSEN15 A Little Example ● File to FTP Example Easy with Camel Just use FTP component
  • 16. PUBLIC PRESENTATION | CLAUS IBSEN16 A Little Example ● Camel's Architecture
  • 17. PUBLIC PRESENTATION | CLAUS IBSEN17 A Little Example 120+ Components
  • 18. PUBLIC PRESENTATION | CLAUS IBSEN18 A Little Example 120+ Components
  • 19. PUBLIC PRESENTATION | CLAUS IBSEN19 A Little Example In fact we have 139 in latest release ... davsclaus:~/Downloads/apache-camel-2.11.0/lib$ ls camel* | wc -l 139
  • 20. PUBLIC PRESENTATION | CLAUS IBSEN20 A Little Example … All components on website
  • 21. PUBLIC PRESENTATION | CLAUS IBSEN21 A Little Example ● Summary ● Components for connectivity ● Camel routes with components and EIPs ● Components easy to configure ● A lot of components ● Very composeable ● Learn Once – Can use 'em All
  • 22. PUBLIC PRESENTATION | CLAUS IBSEN22 Agenda ● A little Example ● Understanding Components ● Essential Components ● Creating new Components ● Q and A
  • 23. PUBLIC PRESENTATION | CLAUS IBSEN23 Understanding Components ● Facilitate messaging for connectivity
  • 24. PUBLIC PRESENTATION | CLAUS IBSEN24 Understanding Components ● Facilitate messaging for connectivity Producer Consumer
  • 25. PUBLIC PRESENTATION | CLAUS IBSEN25 Understanding Components ● … using endpoints via message channels
  • 26. PUBLIC PRESENTATION | CLAUS IBSEN26 Understanding Components ● Component is a factory for creating endpoints ● … and endpoint factory for creating producer and/or consumers
  • 27. PUBLIC PRESENTATION | CLAUS IBSEN27 Understanding Components ● Component auto discovered ● ... or manually added to CamelContext
  • 28. PUBLIC PRESENTATION | CLAUS IBSEN28 Understanding Components ● Endpoints can be configured using URIs ● … or for example using Java code
  • 29. PUBLIC PRESENTATION | CLAUS IBSEN29 Understanding Components ● Revisit File Copier Example
  • 30. PUBLIC PRESENTATION | CLAUS IBSEN30 Understanding Components ● Revisit File Copier Example
  • 31. PUBLIC PRESENTATION | CLAUS IBSEN31 Understanding Components ● What is a Message in Camel?
  • 32. PUBLIC PRESENTATION | CLAUS IBSEN32 Understanding Components ● … and contained in an Exchange during routing http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
  • 33. PUBLIC PRESENTATION | CLAUS IBSEN33 Agenda ● A little Example ● Understanding Components ● Essential Components ● Creating new Components ● Q and A
  • 34. PUBLIC PRESENTATION | CLAUS IBSEN34 Essential Components ● Camel Essential Components Reference Card http://refcardz.dzone.com/refcardz/essential-camel-components
  • 35. PUBLIC PRESENTATION | CLAUS IBSEN35 Essential Components ● Direct Component
  • 36. PUBLIC PRESENTATION | CLAUS IBSEN36 Essential Components ● SEDA Component ● … beware of InOut over SEDA (producer will wait for reply default)
  • 37. PUBLIC PRESENTATION | CLAUS IBSEN37 Essential Components ● Bean Component ● … and use <bean> to declare the bean (standard Spring)
  • 38. PUBLIC PRESENTATION | CLAUS IBSEN38 Essential Components ● … Camel adapts to bean method signature … using bean parameter binding ● http://camel.apache.org/bean-binding.html ● http://camel.apache.org/parameter-binding-annotations.html
  • 39. PUBLIC PRESENTATION | CLAUS IBSEN39 Essential Components ● Log Component ● Log EIP (human readable message)
  • 40. PUBLIC PRESENTATION | CLAUS IBSEN40 Essential Components ● File and FTP Components ● Exec Component http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
  • 41. PUBLIC PRESENTATION | CLAUS IBSEN41 Essential Components ● ActiveMQ / JMS Take time to read about JMS at: http://camel.apache.org/jms
  • 42. PUBLIC PRESENTATION | CLAUS IBSEN42 Essential Components ● ActiveMQ / JMS (cont.) If using transactions with JMS make sure to read about cache levels at: http://camel.apache.org/jms http://camel.apache.org/activemq
  • 43. PUBLIC PRESENTATION | CLAUS IBSEN43 Essential Components ● SQL ● … uri is SQL, and body is SQL parameters. ● Externalize queries in .properties file http://camel.apache.org/sql-example.html
  • 44. PUBLIC PRESENTATION | CLAUS IBSEN44 Essential Components ● JDBC ● … body is SQL and result is List<Map> (eg like ResultSet) Improvement on the way: https://issues.apache.org/jira/browse/CAMEL-6367 http://camel.apache.org/sql-example.html
  • 45. PUBLIC PRESENTATION | CLAUS IBSEN45 Essential Components ● Other JDBC Components ● JPA ● Hibernate ● MyBatis http://camel.apache.org/sql-example.html
  • 46. PUBLIC PRESENTATION | CLAUS IBSEN46 Essential Components ● HTTP/WS/Rest Components ● Jetty / Servlet ● HTTP / HTTP4 / Jetty / AHC ● CXF / Spring-WS ● CXF-RS / Restlet http://camel.apache.org/sql-example.html
  • 47. PUBLIC PRESENTATION | CLAUS IBSEN47 Essential Components ● TCP/UDP Components ● Mina / Mina2 ● Netty http://camel.apache.org/sql-example.html
  • 48. PUBLIC PRESENTATION | CLAUS IBSEN48 Agenda ● A little Example ● Understanding Components ● Essential Components ● Creating new Components ● Q and A
  • 49. PUBLIC PRESENTATION | CLAUS IBSEN49 Creating new Camel Components ● The big picture
  • 50. PUBLIC PRESENTATION | CLAUS IBSEN50 Creating new Camel Components
  • 51. PUBLIC PRESENTATION | CLAUS IBSEN51 Creating new Camel Components
  • 52. PUBLIC PRESENTATION | CLAUS IBSEN52 Creating new Camel Components 1. execute this maven command 2. type camel to filter only Camel archetypes 3. type number to select “camel-archetype-component” (in this ex its 5)3. type number to select “camel-archetype-component” (in this ex its 5) 4. select the Camel version to use Geocoder = Java component name (must be first letter in upper case) geocoder = Camel component name (must be lower-case)
  • 53. PUBLIC PRESENTATION | CLAUS IBSEN53 Creating new Camel Components ● Add 3rd party library to pom.xml file
  • 54. PUBLIC PRESENTATION | CLAUS IBSEN54 Creating new Camel Components ● Auto discover component file in META-INF classpath
  • 55. PUBLIC PRESENTATION | CLAUS IBSEN55 Creating new Camel Components Options as getter/setter Consumer is not supported
  • 56. PUBLIC PRESENTATION | CLAUS IBSEN56 Creating new Camel Components
  • 57. PUBLIC PRESENTATION | CLAUS IBSEN57 Creating new Camel Components
  • 58. PUBLIC PRESENTATION | CLAUS IBSEN58 Creating new Camel Components ● Running unit test ...
  • 59. PUBLIC PRESENTATION | CLAUS IBSEN59 Agenda ● A little Example ● Understanding Components ● Essential Components ● Creating new Components ● Q and A
  • 60. PUBLIC PRESENTATION | CLAUS IBSEN60 Where do I get more information? ● Where can I get the slides? http://www.slideshare.net/davsclaus
  • 61. PUBLIC PRESENTATION | CLAUS IBSEN61 Where do I get more information? ● CamelOne 2013 Conference http://www.camelone.com
  • 62. PUBLIC PRESENTATION | CLAUS IBSEN62 Where do I get more information? ● Getting started with Apache Camel Webinar ● http://fusesource.com Click on webinars menu Building superior …
  • 63. PUBLIC PRESENTATION | CLAUS IBSEN63 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”
  • 64. PUBLIC PRESENTATION | CLAUS IBSEN64 Where do I get more information? ● Camel Essential Components Reference Card http://refcardz.dzone.com/refcardz/essential-camel-components
  • 65. PUBLIC PRESENTATION | CLAUS IBSEN65 Where do I get more information? ● Buy the Camel in Action book http://manning.com/ibsen/ Use code ... camel40 … for 40% discount
  • 66. PUBLIC PRESENTATION | CLAUS IBSEN66 Any Questions ? ● Contact ● EMail: cibsen@redhat.com ● Twitter: @davsclaus ● Blog: http://davsclaus.com ● Linkedin: http://www.linkedin.com/in/davsclaus