66
Copyright © 2010 Progress So3ware Corpora6on and/or its subsidiaries or affiliates. All rights reserved. A Progress So3ware Company A Progress So3ware Company Enterprise Integra6on PaDerns and DSL with Apache Camel 1 by Claus Ibsen Principal So3ware Engineer, FuseSource

Enterprise Integration Patterns and DSL with Apache Camel

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

A  Progress  So3ware  Company

Enterprise  Integra6on  PaDerns  and  DSLwith  Apache  Camel

1

by  Claus  Ibsen

Principal  So3ware  Engineer,  FuseSource

Page 2: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company2

Agenda

Who  is  Claus  Ibsen? What  is  Apache  Camel? Camel  Architecture Whats  included  in  the  box? Running  Camel Live  Demos Apache  ServiceMix Apache  Camel  Roadmap Q  and  A

Page 3: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company3

Who  is  Claus  Ibsen?

Principal  So3ware  Engineer  at  FuseSource•  Full  6me  Apache  Camel  hacker

Apache  Camel  commiDer• Camel  Top  Contributor•  4  years  working  with  Camel

Author  of  Camel  in  Ac6on  book Contact

•  TwiDer:  @davsclaus•  Blog:  hDp://davsclaus.blogspot.com•  Email:  [email protected]

hDp://www.manning.com/ibsen

Page 4: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company4

FuseSource  -­‐  hDp://fusesource.com    

My  Employer

Page 5: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company5

Agenda

Who  is  Claus  Ibsen? What  is  Apache  Camel? Camel  Architecture Whats  included  in  the  box? Running  Camel Live  Demos Apache  ServiceMix Apache  Camel  Roadmap Q  and  A

Page 6: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Quote  from  the  web  site  •  hDp://camel.apache.org

6

Apache  Camel  is  apowerful  Open  SourceIntegra6on  Framework

based  on  knownEnterprise  Integra6on  PaDerns

Page 7: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Why  do  we  need  integra6on?•  Your  apps  are  build  using  different  tech  stacks

•  Cri6cal  for  your  business  to  integrate

Why  Integra6on  Framework?•  Framework  do  the  heavy  li3ing

•  Focus  on  business  problem  

•  Not  "reinven6ng  the  wheel"

7

Page 8: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

What  is  Enterprise  Integra6on  PaDerns?

8

System  A System  B

Page 9: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

What  is  Enterprise  Integra6on  PaDerns?

9

Its  a  book

Page 10: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Camel  and  EIP

10

ApacheAc6veMQ

WebSphereMQ

Page 11: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Camel  and  EIP

11

Page 12: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Camel  and  EIP

12

fromA

send  toB

filtermessage

Page 13: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Camel  and  EIP

13

from(A) to(B)filter(predicate)

Page 14: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Camel  and  EIP

14

from(A) .to(B).filter(isWidget)

Page 15: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Camel  and  EIP

15

from(A).filter(isWidget).to(B);

Page 16: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Camel  and  EIP

16

isWidget  =  xpath("/quote/product  =  ‘widget’");

from(A).filter(isWidget).to(B);

Page 17: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Camel  and  EIP

17

Endpoint  A  =  endpoint("ac6vemq:queue:quote");Endpoint  B  =  endpoint("mq:quote");Predicate  isWidget  =  xpath("/quote/product  =  ‘widget’");

from(A).filter(isWidget).to(B);

Page 18: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Filter  Route

18

public void configure() throws Exception { Endpoint A = endpoint("activemq:queue:quote"); Endpoint B = endpoint("mq:quote"); Predicate isWidget = xpath("/quote/product = ‘widget’");

from(A).filter(isWidget).to(B);}

Page 19: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Filter  Route  -­‐  Java  DSL

19

import org.apache.camel.builder.RouteBuilder;

public class FilterRoute extends RouteBuilder {

public void configure() throws Exception { Endpoint A = endpoint("activemq:queue:quote"); Endpoint B = endpoint("mq:quote"); Predicate isWidget = xpath("/quote/product = ‘widget’");

from(A).filter(isWidget).to(B); }}

Page 20: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Filter  Route  -­‐  Java  DSL

20

import org.apache.camel.builder.RouteBuilder;

public class FilterRoute extends RouteBuilder {

public void configure() throws Exception { from("activemq:queue:quote") .filter().xpath("/quote/product =‘widget’") .to("mq:quote"); }}

Page 21: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Lets  look  at  the  most  famous  paDern

21

Page 22: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Content  Based  Router

22

Page 23: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Content  Based  Router  -­‐  XML  DSL

23

<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>

Page 24: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Content  Based  Router  -­‐  Java  DSL

24

from("activemq:NewOrders") .choice() .when().xpath("/order/product = 'widget'") .to("activemq:Orders.Widget") .otherwise() .to("activemq:Orders.Gadget");

Page 25: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Endpoints  as  URIs

25

from("file:inbox/orders") .choice() .when().xpath("/order/product = 'widget'") .to("activemq:Orders.Widget") .otherwise() .to("activemq:Orders.Gadget");

use file instead

Page 26: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Endpoints  as  URIs

26

from("file:inbox/orders?delete=true") .choice() .when().xpath("/order/product = 'widget'") .to("activemq:Orders.Widget") .otherwise() .to("activemq:Orders.Gadget");

parameters

Page 27: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

What  is  Apache  Camel

Summary•  Integra6on  framework•  Enterprise  Integra6on  PaDerns  (EIP)  •  Rou6ng  (using  DSL)•  Easy  configura6on  (endpoints  as  URIs)•  No  heavy  specifica6on•  No  container  dependency•  Payload  agnos6c•  A  lot  of  components

27

Page 28: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company28

Agenda

Who  is  Claus  Ibsen? What  is  Apache  Camel? Camel  Architecture Enterprise  Integra6on  PaDerns Running  Camel Live  Demos Apache  ServiceMix Apache  Camel  Roadmap Q  and  A

Page 29: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Camel  Architecture

Message  PaDern

29

Page 30: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Camel  Architecture

Message

30

Page 31: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Camel  Architecture

Camel  Exchange

31

Page 32: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Camel  Architecture

Camel  Architecture

32

Page 33: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Camel  Architecture

Camel  DSL  -­‐  Highest  Level  

33

from("file:inbox/orders?delete=true") .choice() .when().xpath("/order/product = 'widget'") .to("activemq:Orders.Widget") .otherwise() .to("activemq:Orders.Gadget");

Page 34: Enterprise Integration Patterns and DSL with Apache Camel

Camel  DSL    -­‐  Lowest  Level• Rou6ng  Engine

• Processor  API

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Camel  Architecture

34

Iterator<Processor> it = ...while (it.hasNext()) { Processor processor = it.next(); processor.process(exchange);}

process(Exchange exchange) throws Exception;

Page 35: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company35

Agenda

Who  is  Claus  Ibsen? What  is  Apache  Camel? Camel  Architecture Enterprise  Integra9on  Pa;erns Running  Camel Live  Demos Apache  ServiceMix Apache  Camel  Roadmap Q  and  A

Page 36: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Enterprise  Integra6on  PaDerns

50  Enterprise  Integra6on  PaDerns

36

http://camel.apache.org/eip

Page 37: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Enterprise  Integra6on  PaDerns

Pipes  and  Filters  EIP

37

from("file:inbox") .pipeline() .to("bean:decrypt") .to("bean:authenticate") .to("bean:deDup");

Page 38: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Enterprise  Integra6on  PaDerns

Pipes  and  Filters  EIP

38

from("file:inbox") .to("bean:decrypt") .to("bean:authenticate") .to("bean:deDup");

pipeline()  is  default  mode  in  Camel  and  can  usually  be  omi5ed

Page 39: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Enterprise  Integra6on  PaDerns

SpliDer  EIP

39

from("file:inbox") .split(body().tokenize("\n") .marshal(customToXml) .to("activemq:line");

File Splitter Custom-> XML ActiveMQ

Page 40: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Enterprise  Integra6on  PaDerns

Recipient  List  EIP

40

ActiveMQREST Service

stock.APPL

stock.ORCL

stock.XXXX

Page 41: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Enterprise  Integra6on  PaDerns

Recipient  List  EIP

41

ActiveMQREST Service

 curl  -­‐X    POST  -­‐d  "120"  "hDp://localhost:9080/stock/ORCL"

stock.APPL

stock.ORCL

stock.XXXX

Page 42: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Enterprise  Integra6on  PaDerns

Bean  as  Message  Translator

42

Page 43: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Enterprise  Integra6on  PaDerns

Bean  as  Message  Translator

43

public class Foo {

public String someMethod(String name) { return “Hello “ + name; }}

from("activemq:Incoming”). beanRef("myBeanName", "someMethod"). to("activemq:Outgoing");

Page 44: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Enterprise  Integra6on  PaDerns

Bean  Parameter  Binding  w/  Annota6ons

44

public class Foo {

public String someMethod(String name, @Header(”JMSCorrelationID”) String cid) { ... }}

from("activemq:Incoming"). beanRef("myBeanName", "someMethod"). to("activemq:Outgoing");

Annota6ons

Page 45: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Enterprise  Integra6on  PaDerns

Bean  Parameter  Binding  w/  Method  Name  (new  in  Camel  2.9)

45

public class Foo {

public String someMethod(String name, String cid) { ... }}

from("activemq:Incoming"). beanRef("myBeanName", "someMethod(${body}, ${header.JMSCorrelationID})"). to("activemq:Outgoing");

Page 46: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company46

Agenda

Who  is  Claus  Ibsen? What  is  Apache  Camel? Camel  Architecture Enterprise  Integra6on  PaDerns Running  Camel Live  Demos Apache  ServiceMix Apache  Camel  Roadmap Q  and  A

Page 47: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Running  Camel

Deployment  Strategy•  No  container  dependency•  Lightweight•  Embedable  

Deployment  Op6ons•Standalone•Spring•WAR•JEE•OSGi•Cloud

47

Known  ContainersFuse  ESBApache  ServiceMixApache  Ac6veMQApache  TomcatJeDyJBossIBM  WebSphereOracle  WebLogicGlassfishGoogle  App  EngineAmazon  EC2...  others

Page 48: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Running  Camel

Java  Applica6on

48

CamelContext context = new DefaultCamelContext();context.addRoutes(new MyRouteBuilder());context.start();

Page 49: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Running  Camel

Spring  Applica6on

49

<beans xmlns="http://www.springframework.org/schema/beans">

<camelContext xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="file:/orders"/> ... </route> </camelContext>

</beans>

Page 50: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Running  Camel

Java  Client  Applica6on

50

CamelContext context = new DefaultCamelContext();context.start();

ProducerTemplate template = context.newProducerTemplate();

Object data = ...String filename = "mydata.csv";String uri = "ftp:myftpserver?username=me&password=secret";

template.sendBodyAndHeader(uri, data, "CamelFileName", filename);

Page 51: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company51

Agenda

Who  is  Claus  Ibsen? What  is  Apache  Camel? Camel  Architecture Enterprise  Integra6on  PaDerns   Running  Camel Live  Demos Apache  ServiceMix Apache  Camel  Roadmap Q  and  A

Page 52: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Live  Demo  1

Groovy  Script

52

groovy  mycamel.groovycurl  hDp://localhost:8080

HTTP Service Transform

Page 53: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Live  Demo  1

Groovy  Script  (mycamel.groovy)

53

Page 54: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Live  Demo  1

Groovy  Script  (mycamel.groovy  -­‐  cont.)

54

Page 55: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Live  Demo  2

Create  new  Project  using  Maven

55

mvn  archetype:generate(camel-­‐archetype-­‐spring)

mvn  eclipse:eclipsemvn  camel:run

File Content Based Router

UK messages

Other messages

Page 56: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company

Live  Demo  2

Create  new  Project  using  Maven

56

Page 57: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company57

Agenda

Who  is  Claus  Ibsen? What  is  Apache  Camel? Camel  Architecture Enterprise  Integra6on  PaDerns Running  Camel Live  Demos Apache  ServiceMix Apache  Camel  Roadmap Q  and  A

Page 58: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company58

Apache  ServiceMix

Architecture

Page 59: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company59

Apache  ServiceMix

Modular

Page 60: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company60

Apache  ServiceMix

ServiceMix  and  Camel  Demo

SSH  access  to  shell

 ssh  smx@localhost  -­‐p  8101

Page 61: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company61

Agenda

Who  is  Claus  Ibsen? What  is  Apache  Camel? Camel  Architecture Enterprise  Integra6on  PaDerns Running  Camel Live  Demos Apache  ServiceMix Apache  Camel  Roadmap Q  and  A

Page 62: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company62

Apache  Camel  Roadmap

Apache  Camel  2.9.0  -­‐  Highlights• Reduced  Spring  JAR  dependency• Reworked  Simple  Expression  Language• Splisng  big  XML  files  in  streaming  mode• Improved  Bean  Parameter  Binding• Improved  JMX• Improved  JMS  request/reply• Addi6onal  Camel  shell  commands• JClouds  Component

hDp://camel.apache.org/camel-­‐290-­‐release.html

hDp://davsclaus.blogspot.com

Page 63: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company63

Apache  Camel  Roadmap

Apache  Camel  2.10  -­‐  Roadmap• Blueprint  not  6ed  to  Apache  Aries• Transac6on  API  not  6ed  to  Spring  TX  API• Make  it  easier  to  use  Bindy• Persistent  Dead  LeDer  Channel• CDI  support• camel-­‐mina2  component

Page 64: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company64

Apache  Camel  Roadmap

Apache  Camel  3.0  -­‐  Roadmap• Split  camel-­‐core  into  mul6ple  JARs• Support  async  transac6ons• Internal  rou6ng  engine  cleanup• Dynamic  add/remove  interceptors  to  running  routes• Unify  JMX/REST  API  for  management

hDp://camel.apache.org/camel-­‐30-­‐roadmap.html

Page 65: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company65

Agenda

Who  is  Claus  Ibsen? What  is  Apache  Camel? Camel  Architecture Enterprise  Integra6on  PaDerns Running  Camel Live  Demos Apache  ServiceMix Apache  Camel  Roadmap Q  and  A

Page 66: Enterprise Integration Patterns and DSL with Apache Camel

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.   A  Progress  So3ware  Company66

Q  and  A

? Contact

•  TwiDer:  @davsclaus•  Blog:  hDp://davsclaus.blogspot.com•  Email:  [email protected]