2
2
Simplify Enterprise Integration
With
Apache Camel and Fuse
Christian Posta
Principal Middleware Specialist/Architect
3
•  What is Integration?
•  Camel… what?
•  Honestly… Camel Rox!
•  Demo time!
•  Questions? Yah… over beer J
Agenda
4
Your speaker
Christian Posta
Blog: http://christianposta.com/blog
Twitter: @christianposta
Email: christian@redhat.com
•...
5
5
What is Integration?
6
7
•  Off the shelf? Home Grown? Acquisition?
•  Platforms
•  Protocols / Data Formats
•  Data Formats
•  Timing
•  Organiz...
8
•  Common language!!!!!
•  Specific context
•  Forces at work
•  Concrete solution
•  Guidance
•  65 patterns
Patterns F...
9
•  Protocol mediation
•  Routing, Transformation, EIPs
•  Start small, build up, ESB if needed
•  Open Source
•  Communi...
Consume XML doc from file system, put onto
messaging queue, separately consume from queue,
do some routing, archive to fil...
11
11
Camel… right?
12
Apache Camel
Apache Camel is an open-source,
light-weight, integration library.
Use Camel to integrate disparate system...
13
•  Light-weight integration library
•  Domain Specific Language
•  Enterprise Integration Patterns
•  Components
•  Rou...
14
Quick Example
File System Message Oriented Middleware
15
Quick Example
From A Send to B
Filter
message
16
Quick Example
from(A) to(B)filter(predicate)
17
Quick Example
from(A) .to(B).filter(isWidget)
18
Quick Example
isWidget = xpath(“/quote/product = ‘widget’”);
from(A) .filter(isWidget). to(B)
19
19
Honestly! Camel Rox!
20
•  Defined in Java, XML, Scala, Groovy DSL
•  Step by step processing of a message:
•  Consumer – Listen for incoming m...
21
• 
Domain Specific Language
•  Domain specific (integration)
•  Build and describe integration flows
•  Embedded within...
22
public class OrderProcessorRouteBuilder extends RouteBuilder {	
	
@Override	
public void configure() throws Exception {...
23
<route id=“processOrders”>
<from uri=“activemq:orders”/>
<choice>
<when>
<simple>${header.customer-rating} == ‘gold’</s...
24
•  Message Routing
•  Transformation
•  Aggregation
•  Splitting
•  Resequencer
•  Routing Slip
•  Enricher
Enterprise ...
25
Components
•  ActiveMQ, Websphere, Weblogic (JMS)
•  AMQP
•  ATOM feeds
•  AWS (S3, SQS, SNS, others)
•  Bean
•  Cache ...
26
•  URI format:
•  scheme:localPart[?options]
•  scheme: identifies the “component”
•  localPart: specific to the compon...
27
Another Example
public class MyExampleRouteBuilder extends RouteBuilder {	
	
@Override	
public void configure() throws ...
28
• 
Management with HawtIO
http://hawt.io
29
• 
Developer Tooling Support
30
JBoss Fuse
Integrate Everything!
Fabric8 (JBoss Fuse + Fabric)
•  http://fabric8.io
•  Simplifies deployments, management
•  Blurs the line of PaaS
•  Prov...
32
Fabric8
33
33
Resources
34
Professional Training
Camel Development with Red Hat JBoss Fuse
http://www.redhat.com/training/courses/jb421r/
Red Hat ...
35
• 
Books
36
• 
Dzone Refcardz
•  Camel Essential Components
•  http://refcardz.dzone.com/refcardz/essential-camel-components
•  Ess...
37
37
Questions
Consume XML doc from file system, put
onto messaging queue,
38
Separately consume from queue, do
some routing, archive to file system.
39
Logging, tracing, debugging. Also
implement flexibility, HA messaging,
scalability.
40
Simplify integrations-final-pdf
Upcoming SlideShare
Loading in...5
×

Simplify integrations-final-pdf

1,685

Published on

My DevNation 2014 talk, Camel, Fabric8, Devops

Published in: Software, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,685
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
30
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Simplify integrations-final-pdf

  1. 1. 2 2 Simplify Enterprise Integration With Apache Camel and Fuse Christian Posta Principal Middleware Specialist/Architect
  2. 2. 3 •  What is Integration? •  Camel… what? •  Honestly… Camel Rox! •  Demo time! •  Questions? Yah… over beer J Agenda
  3. 3. 4 Your speaker Christian Posta Blog: http://christianposta.com/blog Twitter: @christianposta Email: christian@redhat.com •  Principal Middleware Specialist/Architect •  Based in Phoenix, AZ •  Committer on Apache Camel, ActiveMQ, Apollo •  Author: Essential Camel Components DZone Refcard
  4. 4. 5 5 What is Integration?
  5. 5. 6
  6. 6. 7 •  Off the shelf? Home Grown? Acquisition? •  Platforms •  Protocols / Data Formats •  Data Formats •  Timing •  Organizational mismatch Integration L
  7. 7. 8 •  Common language!!!!! •  Specific context •  Forces at work •  Concrete solution •  Guidance •  65 patterns Patterns FTW!
  8. 8. 9 •  Protocol mediation •  Routing, Transformation, EIPs •  Start small, build up, ESB if needed •  Open Source •  Community driven Lightweight integration, right?
  9. 9. Consume XML doc from file system, put onto messaging queue, separately consume from queue, do some routing, archive to file system. Logging, tracing, debugging. Also implement flexibility, HA messaging, scalability. •  Clearly cannot be done •  A few months •  A few weeks •  A few Days •  < 1 day10
  10. 10. 11 11 Camel… right?
  11. 11. 12 Apache Camel Apache Camel is an open-source, light-weight, integration library. Use Camel to integrate disparate systems that speak different protocols and data formats
  12. 12. 13 •  Light-weight integration library •  Domain Specific Language •  Enterprise Integration Patterns •  Components •  Routing and Mediation (like an ESB?) •  Runs in any container (or stand alone) What is Apache Camel?
  13. 13. 14 Quick Example File System Message Oriented Middleware
  14. 14. 15 Quick Example From A Send to B Filter message
  15. 15. 16 Quick Example from(A) to(B)filter(predicate)
  16. 16. 17 Quick Example from(A) .to(B).filter(isWidget)
  17. 17. 18 Quick Example isWidget = xpath(“/quote/product = ‘widget’”); from(A) .filter(isWidget). to(B)
  18. 18. 19 19 Honestly! Camel Rox!
  19. 19. 20 •  Defined in Java, XML, Scala, Groovy DSL •  Step by step processing of a message: •  Consumer – Listen for incoming message •  Zero or more “filters” or Processors •  Producer – Send outgoing message •  Pipeline of “filters” or “processors” •  EIPs •  Tranformation •  Expressions •  Exceptions Camel Routes
  20. 20. 21 •  Domain Specific Language •  Domain specific (integration) •  Build and describe integration flows •  Embedded within a general programming language •  Java, Spring XML, Scala, Groovy •  Take advantage of existing tools •  Fluent builders (builder pattern…) •  from(“..”).enrich(“…”).filter(“..”).to(“…”);
  21. 21. 22 public class OrderProcessorRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from(“activemq:orders”) .choice() .when(header(“customer-rating”).isEqualTo(“gold”)) .to(“ibmmq:topic:specialCustomer”) .otherwise() .to(“ftp://user@host/orders/regularCustomers”) .end() .log(“received new order ${body.orderId}”) .to(“ibatis:storeOrder?statementType=Insert”); } }
  22. 22. 23 <route id=“processOrders”> <from uri=“activemq:orders”/> <choice> <when> <simple>${header.customer-rating} == ‘gold’</simple> <to uri=“ibmmq:topic:specialCustomer”> </when> <otherwise> <to uri=“ftp://user@host/orders/regularCustomers” /> </otherwise> </choice> <log message=“received new order ${body.orderId}”/> <to uri=“ibatis:storeOrder?statementType=Insert”/> </route>
  23. 23. 24 •  Message Routing •  Transformation •  Aggregation •  Splitting •  Resequencer •  Routing Slip •  Enricher Enterprise Integration Patterns
  24. 24. 25 Components •  ActiveMQ, Websphere, Weblogic (JMS) •  AMQP •  ATOM feeds •  AWS (S3, SQS, SNS, others) •  Bean •  Cache (EHCache) •  CXF (JAX-WS, JAX-RS) •  EJB •  Drools •  File •  FTP •  Google App Engine •  GMail •  HTTP •  IRC •  jclouds •  JDBC •  Jetty •  Twitter •  MQTT •  MyBatis •  JPA •  Spring Integration •  Spring Web Services http://camel.apache.org/components.html To see list of all components!!
  25. 25. 26 •  URI format: •  scheme:localPart[?options] •  scheme: identifies the “component” •  localPart: specific to the component •  options: is a list of name-value pairs •  Creates endpoints based on configuration •  Route endpoint “factories” •  Integrate with Camel Routes by creating producer/ consumer endpoints Components from(“aws-sqs://demo?defaultVisibilityTimeout=2”)
  26. 26. 27 Another Example public class MyExampleRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from(“aws-sqs://demo?defaultVisibilityTimeout=2”) .setHeader(“type”).jsonpath(“$[‘type’]”) .filter(simple(“${header.type} == ‘login’”) .to(“jms:quote”); } }
  27. 27. 28 •  Management with HawtIO http://hawt.io
  28. 28. 29 •  Developer Tooling Support
  29. 29. 30 JBoss Fuse Integrate Everything!
  30. 30. Fabric8 (JBoss Fuse + Fabric) •  http://fabric8.io •  Simplifies deployments, management •  Blurs the line of PaaS •  Provides cluster capabilities, coordination •  Containers and Profiles •  Provides additional management tools for centralized configuration and monitoring 31
  31. 31. 32 Fabric8
  32. 32. 33 33 Resources
  33. 33. 34 Professional Training Camel Development with Red Hat JBoss Fuse http://www.redhat.com/training/courses/jb421r/ Red Hat JBoss A-MQ Development and Deployment https://www.redhat.com/training/courses/jb437r/ Red Hat Certificate of Expertise in Camel Development http://www.redhat.com/training/certifications/jbcd-camel-development/
  34. 34. 35 •  Books
  35. 35. 36 •  Dzone Refcardz •  Camel Essential Components •  http://refcardz.dzone.com/refcardz/essential-camel-components •  Essential EIP with Apache Camel •  http://refcardz.dzone.com/refcardz/enterprise-integration REFCARDZ
  36. 36. 37 37 Questions
  37. 37. Consume XML doc from file system, put onto messaging queue, 38
  38. 38. Separately consume from queue, do some routing, archive to file system. 39
  39. 39. Logging, tracing, debugging. Also implement flexibility, HA messaging, scalability. 40
  1. A particular slide catching your eye?

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

×