PUBLIC PRESENTATION | CLAUS IBSEN1Using Apache Camel connectors forexternal connectivityClaus IbsenPrincipal Software Engi...
PUBLIC PRESENTATION | CLAUS IBSEN2
PUBLIC PRESENTATION | CLAUS IBSEN3
PUBLIC PRESENTATION | CLAUS IBSEN4Your Speaker● Principal Software Engineer at Red Hat● Apache Camel● 5 years working with...
PUBLIC PRESENTATION | CLAUS IBSEN5Agenda● A little Example● Understanding Components● Essential Components● Creating new C...
PUBLIC PRESENTATION | CLAUS IBSEN6A Little Example● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN7A Little Example
PUBLIC PRESENTATION | CLAUS IBSEN8A Little Example● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN9A Little Example● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN10A Little Example● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN11A Little Example● File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN12A Little Example● File Copier Example (in XML)
PUBLIC PRESENTATION | CLAUS IBSEN13A Little Example● File to FTP ExampleFiles is coped from data/inboxto a remote FTP server
PUBLIC PRESENTATION | CLAUS IBSEN14A Little Example● File to FTP ExampleHow to write this in pure Java code ???
PUBLIC PRESENTATION | CLAUS IBSEN15A Little Example● File to FTP ExampleEasy with CamelJust use FTP component
PUBLIC PRESENTATION | CLAUS IBSEN16A Little Example● Camels Architecture
PUBLIC PRESENTATION | CLAUS IBSEN17A Little Example120+ Components
PUBLIC PRESENTATION | CLAUS IBSEN18A Little Example120+ Components
PUBLIC PRESENTATION | CLAUS IBSEN19A Little ExampleIn fact we have 139 in latest release ...davsclaus:~/Downloads/apache-c...
PUBLIC PRESENTATION | CLAUS IBSEN20A Little Example… All components on website
PUBLIC PRESENTATION | CLAUS IBSEN21A Little Example● Summary● Components for connectivity● Camel routes with components an...
PUBLIC PRESENTATION | CLAUS IBSEN22Agenda● A little Example● Understanding Components● Essential Components● Creating new ...
PUBLIC PRESENTATION | CLAUS IBSEN23Understanding Components● Facilitate messaging for connectivity
PUBLIC PRESENTATION | CLAUS IBSEN24Understanding Components● Facilitate messaging for connectivityProducer Consumer
PUBLIC PRESENTATION | CLAUS IBSEN25Understanding Components● … using endpoints via message channels
PUBLIC PRESENTATION | CLAUS IBSEN26Understanding Components● Component is a factory for creating endpoints● … and endpoint...
PUBLIC PRESENTATION | CLAUS IBSEN27Understanding Components● Component auto discovered● ... or manually added to CamelCont...
PUBLIC PRESENTATION | CLAUS IBSEN28Understanding Components● Endpoints can be configured using URIs● … or for example usin...
PUBLIC PRESENTATION | CLAUS IBSEN29Understanding Components● Revisit File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN30Understanding Components● Revisit File Copier Example
PUBLIC PRESENTATION | CLAUS IBSEN31Understanding Components● What is a Message in Camel?
PUBLIC PRESENTATION | CLAUS IBSEN32Understanding Components● … and contained in an Exchange during routinghttp://camel.apa...
PUBLIC PRESENTATION | CLAUS IBSEN33Agenda● A little Example● Understanding Components● Essential Components● Creating new ...
PUBLIC PRESENTATION | CLAUS IBSEN34Essential Components● Camel Essential Components Reference Cardhttp://refcardz.dzone.co...
PUBLIC PRESENTATION | CLAUS IBSEN35Essential Components● Direct Component
PUBLIC PRESENTATION | CLAUS IBSEN36Essential Components● SEDA Component● … beware of InOut over SEDA(producer will wait fo...
PUBLIC PRESENTATION | CLAUS IBSEN37Essential Components● Bean Component● … and use <bean> to declare the bean(standard Spr...
PUBLIC PRESENTATION | CLAUS IBSEN38Essential Components● … Camel adapts to bean method signature… using bean parameter bin...
PUBLIC PRESENTATION | CLAUS IBSEN39Essential Components● Log Component● Log EIP (human readable message)
PUBLIC PRESENTATION | CLAUS IBSEN40Essential Components● File and FTP Components● Exec Componenthttp://camel.apache.org/ho...
PUBLIC PRESENTATION | CLAUS IBSEN41Essential Components● ActiveMQ / JMSTake time to read about JMS at:http://camel.apache....
PUBLIC PRESENTATION | CLAUS IBSEN42Essential Components● ActiveMQ / JMS (cont.)If using transactions with JMSmake sure to ...
PUBLIC PRESENTATION | CLAUS IBSEN43Essential Components● SQL● … uri is SQL, and body is SQL parameters.● Externalize queri...
PUBLIC PRESENTATION | CLAUS IBSEN44Essential Components● JDBC● … body is SQL and result is List<Map>(eg like ResultSet)Imp...
PUBLIC PRESENTATION | CLAUS IBSEN45Essential Components● Other JDBC Components● JPA● Hibernate● MyBatishttp://camel.apache...
PUBLIC PRESENTATION | CLAUS IBSEN46Essential Components● HTTP/WS/Rest Components● Jetty / Servlet● HTTP / HTTP4 / Jetty / ...
PUBLIC PRESENTATION | CLAUS IBSEN47Essential Components● TCP/UDP Components● Mina / Mina2● Nettyhttp://camel.apache.org/sq...
PUBLIC PRESENTATION | CLAUS IBSEN48Agenda● A little Example● Understanding Components● Essential Components● Creating new ...
PUBLIC PRESENTATION | CLAUS IBSEN49Creating new Camel Components● The big picture
PUBLIC PRESENTATION | CLAUS IBSEN50Creating new Camel Components
PUBLIC PRESENTATION | CLAUS IBSEN51Creating new Camel Components
PUBLIC PRESENTATION | CLAUS IBSEN52Creating new Camel Components1. execute this maven command2. type camel to filter only ...
PUBLIC PRESENTATION | CLAUS IBSEN53Creating new Camel Components●Add 3rdparty library to pom.xml file
PUBLIC PRESENTATION | CLAUS IBSEN54Creating new Camel Components● Auto discover componentfile in META-INF classpath
PUBLIC PRESENTATION | CLAUS IBSEN55Creating new Camel ComponentsOptions as getter/setterConsumer is not supported
PUBLIC PRESENTATION | CLAUS IBSEN56Creating new Camel Components
PUBLIC PRESENTATION | CLAUS IBSEN57Creating new Camel Components
PUBLIC PRESENTATION | CLAUS IBSEN58Creating new Camel Components● Running unit test ...
PUBLIC PRESENTATION | CLAUS IBSEN59Agenda● A little Example● Understanding Components● Essential Components● Creating new ...
PUBLIC PRESENTATION | CLAUS IBSEN60Where do I get more information?● Where can I get the slides?http://www.slideshare.net/...
PUBLIC PRESENTATION | CLAUS IBSEN61Where do I get more information?● CamelOne 2013 Conferencehttp://www.camelone.com
PUBLIC PRESENTATION | CLAUS IBSEN62Where do I get more information?● Getting started with Apache Camel Webinar● http://fus...
PUBLIC PRESENTATION | CLAUS IBSEN63Where do I get more information?● Best Article covering what Apache Camel is● http://ja...
PUBLIC PRESENTATION | CLAUS IBSEN64Where do I get more information?● Camel Essential Components Reference Cardhttp://refca...
PUBLIC PRESENTATION | CLAUS IBSEN65Where do I get more information?● Buy the Camel in Action bookhttp://manning.com/ibsen/...
PUBLIC PRESENTATION | CLAUS IBSEN66Any Questions ?● Contact● EMail: cibsen@redhat.com● Twitter: @davsclaus● Blog: http://d...
Upcoming SlideShare
Loading in...5
×

Using Apache Camel connectors for external connectivity

3,432

Published on

Published in: Technology, Education
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,432
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
137
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Using Apache Camel connectors for external connectivity

  1. 1. PUBLIC PRESENTATION | CLAUS IBSEN1Using Apache Camel connectors forexternal connectivityClaus IbsenPrincipal Software Engineer, Red HatMay 2013
  2. 2. PUBLIC PRESENTATION | CLAUS IBSEN2
  3. 3. PUBLIC PRESENTATION | CLAUS IBSEN3
  4. 4. PUBLIC PRESENTATION | CLAUS IBSEN4Your 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. 5. PUBLIC PRESENTATION | CLAUS IBSEN5Agenda● A little Example● Understanding Components● Essential Components● Creating new Components● Q and A
  6. 6. PUBLIC PRESENTATION | CLAUS IBSEN6A Little Example● File Copier Example
  7. 7. PUBLIC PRESENTATION | CLAUS IBSEN7A Little Example
  8. 8. PUBLIC PRESENTATION | CLAUS IBSEN8A Little Example● File Copier Example
  9. 9. PUBLIC PRESENTATION | CLAUS IBSEN9A Little Example● File Copier Example
  10. 10. PUBLIC PRESENTATION | CLAUS IBSEN10A Little Example● File Copier Example
  11. 11. PUBLIC PRESENTATION | CLAUS IBSEN11A Little Example● File Copier Example
  12. 12. PUBLIC PRESENTATION | CLAUS IBSEN12A Little Example● File Copier Example (in XML)
  13. 13. PUBLIC PRESENTATION | CLAUS IBSEN13A Little Example● File to FTP ExampleFiles is coped from data/inboxto a remote FTP server
  14. 14. PUBLIC PRESENTATION | CLAUS IBSEN14A Little Example● File to FTP ExampleHow to write this in pure Java code ???
  15. 15. PUBLIC PRESENTATION | CLAUS IBSEN15A Little Example● File to FTP ExampleEasy with CamelJust use FTP component
  16. 16. PUBLIC PRESENTATION | CLAUS IBSEN16A Little Example● Camels Architecture
  17. 17. PUBLIC PRESENTATION | CLAUS IBSEN17A Little Example120+ Components
  18. 18. PUBLIC PRESENTATION | CLAUS IBSEN18A Little Example120+ Components
  19. 19. PUBLIC PRESENTATION | CLAUS IBSEN19A Little ExampleIn fact we have 139 in latest release ...davsclaus:~/Downloads/apache-camel-2.11.0/lib$ ls camel* | wc -l139
  20. 20. PUBLIC PRESENTATION | CLAUS IBSEN20A Little Example… All components on website
  21. 21. PUBLIC PRESENTATION | CLAUS IBSEN21A 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. 22. PUBLIC PRESENTATION | CLAUS IBSEN22Agenda● A little Example● Understanding Components● Essential Components● Creating new Components● Q and A
  23. 23. PUBLIC PRESENTATION | CLAUS IBSEN23Understanding Components● Facilitate messaging for connectivity
  24. 24. PUBLIC PRESENTATION | CLAUS IBSEN24Understanding Components● Facilitate messaging for connectivityProducer Consumer
  25. 25. PUBLIC PRESENTATION | CLAUS IBSEN25Understanding Components● … using endpoints via message channels
  26. 26. PUBLIC PRESENTATION | CLAUS IBSEN26Understanding Components● Component is a factory for creating endpoints● … and endpoint factory for creating producer and/orconsumers
  27. 27. PUBLIC PRESENTATION | CLAUS IBSEN27Understanding Components● Component auto discovered● ... or manually added to CamelContext
  28. 28. PUBLIC PRESENTATION | CLAUS IBSEN28Understanding Components● Endpoints can be configured using URIs● … or for example using Java code
  29. 29. PUBLIC PRESENTATION | CLAUS IBSEN29Understanding Components● Revisit File Copier Example
  30. 30. PUBLIC PRESENTATION | CLAUS IBSEN30Understanding Components● Revisit File Copier Example
  31. 31. PUBLIC PRESENTATION | CLAUS IBSEN31Understanding Components● What is a Message in Camel?
  32. 32. PUBLIC PRESENTATION | CLAUS IBSEN32Understanding Components● … and contained in an Exchange during routinghttp://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
  33. 33. PUBLIC PRESENTATION | CLAUS IBSEN33Agenda● A little Example● Understanding Components● Essential Components● Creating new Components● Q and A
  34. 34. PUBLIC PRESENTATION | CLAUS IBSEN34Essential Components● Camel Essential Components Reference Cardhttp://refcardz.dzone.com/refcardz/essential-camel-components
  35. 35. PUBLIC PRESENTATION | CLAUS IBSEN35Essential Components● Direct Component
  36. 36. PUBLIC PRESENTATION | CLAUS IBSEN36Essential Components● SEDA Component● … beware of InOut over SEDA(producer will wait for reply default)
  37. 37. PUBLIC PRESENTATION | CLAUS IBSEN37Essential Components● Bean Component● … and use <bean> to declare the bean(standard Spring)
  38. 38. PUBLIC PRESENTATION | CLAUS IBSEN38Essential 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. 39. PUBLIC PRESENTATION | CLAUS IBSEN39Essential Components● Log Component● Log EIP (human readable message)
  40. 40. PUBLIC PRESENTATION | CLAUS IBSEN40Essential Components● File and FTP Components● Exec Componenthttp://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
  41. 41. PUBLIC PRESENTATION | CLAUS IBSEN41Essential Components● ActiveMQ / JMSTake time to read about JMS at:http://camel.apache.org/jms
  42. 42. PUBLIC PRESENTATION | CLAUS IBSEN42Essential Components● ActiveMQ / JMS (cont.)If using transactions with JMSmake sure to read aboutcache levels at:http://camel.apache.org/jmshttp://camel.apache.org/activemq
  43. 43. PUBLIC PRESENTATION | CLAUS IBSEN43Essential Components● SQL● … uri is SQL, and body is SQL parameters.● Externalize queries in .properties filehttp://camel.apache.org/sql-example.html
  44. 44. PUBLIC PRESENTATION | CLAUS IBSEN44Essential Components● JDBC● … body is SQL and result is List<Map>(eg like ResultSet)Improvement on the way: https://issues.apache.org/jira/browse/CAMEL-6367http://camel.apache.org/sql-example.html
  45. 45. PUBLIC PRESENTATION | CLAUS IBSEN45Essential Components● Other JDBC Components● JPA● Hibernate● MyBatishttp://camel.apache.org/sql-example.html
  46. 46. PUBLIC PRESENTATION | CLAUS IBSEN46Essential Components● HTTP/WS/Rest Components● Jetty / Servlet● HTTP / HTTP4 / Jetty / AHC● CXF / Spring-WS● CXF-RS / Restlethttp://camel.apache.org/sql-example.html
  47. 47. PUBLIC PRESENTATION | CLAUS IBSEN47Essential Components● TCP/UDP Components● Mina / Mina2● Nettyhttp://camel.apache.org/sql-example.html
  48. 48. PUBLIC PRESENTATION | CLAUS IBSEN48Agenda● A little Example● Understanding Components● Essential Components● Creating new Components● Q and A
  49. 49. PUBLIC PRESENTATION | CLAUS IBSEN49Creating new Camel Components● The big picture
  50. 50. PUBLIC PRESENTATION | CLAUS IBSEN50Creating new Camel Components
  51. 51. PUBLIC PRESENTATION | CLAUS IBSEN51Creating new Camel Components
  52. 52. PUBLIC PRESENTATION | CLAUS IBSEN52Creating new Camel Components1. execute this maven command2. type camel to filter only Camel archetypes3. 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 useGeocoder = Java component name(must be first letter in upper case)geocoder = Camel component name(must be lower-case)
  53. 53. PUBLIC PRESENTATION | CLAUS IBSEN53Creating new Camel Components●Add 3rdparty library to pom.xml file
  54. 54. PUBLIC PRESENTATION | CLAUS IBSEN54Creating new Camel Components● Auto discover componentfile in META-INF classpath
  55. 55. PUBLIC PRESENTATION | CLAUS IBSEN55Creating new Camel ComponentsOptions as getter/setterConsumer is not supported
  56. 56. PUBLIC PRESENTATION | CLAUS IBSEN56Creating new Camel Components
  57. 57. PUBLIC PRESENTATION | CLAUS IBSEN57Creating new Camel Components
  58. 58. PUBLIC PRESENTATION | CLAUS IBSEN58Creating new Camel Components● Running unit test ...
  59. 59. PUBLIC PRESENTATION | CLAUS IBSEN59Agenda● A little Example● Understanding Components● Essential Components● Creating new Components● Q and A
  60. 60. PUBLIC PRESENTATION | CLAUS IBSEN60Where do I get more information?● Where can I get the slides?http://www.slideshare.net/davsclaus
  61. 61. PUBLIC PRESENTATION | CLAUS IBSEN61Where do I get more information?● CamelOne 2013 Conferencehttp://www.camelone.com
  62. 62. PUBLIC PRESENTATION | CLAUS IBSEN62Where do I get more information?● Getting started with Apache Camel Webinar● http://fusesource.comClick on webinars menuBuilding superior …
  63. 63. PUBLIC PRESENTATION | CLAUS IBSEN63Where do I get more information?● Best Article covering what Apache Camel is● http://java.dzone.com/articles/open-source-integration-apacheLink to article from “Getting Started”
  64. 64. PUBLIC PRESENTATION | CLAUS IBSEN64Where do I get more information?● Camel Essential Components Reference Cardhttp://refcardz.dzone.com/refcardz/essential-camel-components
  65. 65. PUBLIC PRESENTATION | CLAUS IBSEN65Where do I get more information?● Buy the Camel in Action bookhttp://manning.com/ibsen/Use code ...camel40… for 40% discount
  66. 66. PUBLIC PRESENTATION | CLAUS IBSEN66Any Questions ?● Contact● EMail: cibsen@redhat.com● Twitter: @davsclaus● Blog: http://davsclaus.com● Linkedin: http://www.linkedin.com/in/davsclaus
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×