86
Copyright © 2010 Progress So3ware Corpora6on and/or its subsidiaries or affiliates. All rights reserved. A Progress So3ware Company A Progress So3ware Company 1 Apache Camel Claus Ibsen Principal Software Engineer, FuseSource October 2010 1

Apache camel community day - october 2010

Embed Size (px)

DESCRIPTION

Presentation I gave at the Fuse Community Day in Paris on October 2010

Citation preview

Page 1: Apache camel   community day - october 2010

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

A  Progress  So3ware  Company

1

Apache  Camel

Claus IbsenPrincipal Software Engineer, FuseSourceOctober 2010

1

Page 2: Apache camel   community day - october 2010

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

Agenda

Who  is  Claus  Ibsen?

The  birth  of  Apache  Camel

What  is  Apache  Camel

A  li<le  example

Whats  included  in  the  box?

Running  Camel

Another  Example

The  Camel  Community

Q  and  A

2

Page 3: Apache camel   community day - october 2010

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

Who  is  Claus  Ibsen?

Principal  SoEware  Engineer  at  FuseSource• Full  Ime  Apache  Camel  hacker

Apache  Camel  commi<er  for  2.5  years• Almost  3  years  working  with  Camel

Co-­‐author  of  Camel  in  AcIon  book• Available  in  late  2010

Contact• [email protected]

• h<p://davsclaus.blogspot.com

• h<p://twi<er.com/davsclaushttp://

www.manning.com/ibsen

3

Page 4: Apache camel   community day - october 2010

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

Why  the  name  Camel?

Camel is easyto remember

and type

4

Page 5: Apache camel   community day - october 2010

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

Agenda

Who  is  Claus  Ibsen?

The  birth  of  Apache  Camel

What  is  Apache  Camel

A  li<le  example

Whats  included  in  the  box?

Running  Camel

Another  Example  

The  Camel  Community

Q  and  A

5

Page 6: Apache camel   community day - october 2010

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

The  birth  of  Apache  Camel

• Camel’s  parents

6

Page 7: Apache camel   community day - october 2010

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

The  birth  of  Apache  Camel

IniIal  Commit  Logr519901  |  jstrachan  |  2007-­‐03-­‐19  11:54:57  +0100(Mon,  19  Mar  2007)  |  1  line

IniGal  checkin  of  Camel  rouGng  library

Apache  Camel  1.0  released  June  2007

Apache  Camel  is  3  years  old

7

Page 8: Apache camel   community day - october 2010

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

The  birth  of  Apache  Camel

My  iniIal  commit

r640963  |  davsclaus  |  2008-­‐03-­‐25  21:07:10  +0100(Tue,  25  Mar  2008)  |  1  line

Added  unit  test  for  mistyped  URI

8

8

Page 9: Apache camel   community day - october 2010

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

Agenda

Who  is  Claus  Ibsen?

The  birth  of  Apache  Camel

What  is  Apache  Camel

A  li<le  example

Whats  included  in  the  box?

Running  Camel

Another  Example

The  Camel  Community

Q  and  A

9

Page 10: Apache camel   community day - october 2010

Copyright  ©  2010  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  -­‐  h<p://camel.apache.org

10

Apache  Camel  is  apowerful  Open  SourceIntegra8on  Framework

based  on  knownEnterprise  Integra8on  Pa?erns

10

Page 11: Apache camel   community day - october 2010

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

What  is  Apache  Camel

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

• CriIcal  for  your  business  to  integrate

Why  IntegraIon  Framework?• Framework  do  the  heavy  liEing

• Focus  on  business  problem

• Not  "reinvenIng  the  wheel"

11

11

Page 12: Apache camel   community day - october 2010

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

What  is  Apache  Camel

What  is  Enterprise  IntegraIon  Pa<erns?

12

12

Page 13: Apache camel   community day - october 2010

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

What  is  Apache  Camel

What  are  Enterprise  IntegraIon  Pa<erns?

13

13

Page 14: Apache camel   community day - october 2010

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

What  is  Apache  Camel

What  is  Enterprise  IntegraIon  Pa<erns?

14

Its a book

14

Page 15: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Lets  look  at  one  of  the  pa<erns

15

15

Page 16: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Use  Case

16

ActiveMQ WebSphereMQ

16

Page 17: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Filter  Pa<ern

17

17

Page 18: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Filter  Pa<ern

18

fromA

send toB

filtermessage

18

Page 19: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Filter  Pa<ern

19

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

19

Page 20: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Filter  Pa<ern

20

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

20

Page 21: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Filter  Route

21

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

21

Page 22: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Filter  Route

22

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

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

22

Page 23: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Filter  Route

23

Endpoint A = endpoint(“activemq:queue:quote”);

Endpoint B = endpoint(“mq:quote”);

Predicate isWidget = xpath(“/quote/product = ‘widget’”);

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

23

Page 24: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Filter  Route  -­‐  Java  DSL

24

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);}

24

Page 25: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Filter  Route  -­‐  Java  DSL

25

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); }}

25

Page 26: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Filter  Route  -­‐  Java  DSL

26

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"); }}

26

Page 27: Apache camel   community day - october 2010

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

What  is  Apache  Camel

IDE  Tooling

27

Code Assistance

JavaDoc

27

Page 28: Apache camel   community day - october 2010

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

What  is  Apache  Camel

IDE  Tooling

28

Code Assistance

28

Page 29: Apache camel   community day - october 2010

Copyright  ©  2010  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  pa<ern

29

29

Page 30: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Content  Based  Router

30

30

Page 31: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Content  Based  Router  -­‐  Spring  XML

31

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

31

Page 32: Apache camel   community day - october 2010

Copyright  ©  2010  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

32

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

32

Page 33: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Summary• Camel  is  an  integraIon  framework

• Based  on  Enterprise  IntegraIon  Pa<erns

• RouIng  and  mediaIon

• Easy  to  use  DSL  to  define  routes

• No  heavy  specificaIon

• No  container  dependency

• Payload  agnosIc

• ConnecIvity  to  a  great  wealth  of  transports

• Apache  licensed

33

33

Page 34: Apache camel   community day - october 2010

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

What  is  Apache  Camel

Mission  Statement

34

Making  integra8on  easier  and  more  accessible  to  developers

34

Page 35: Apache camel   community day - october 2010

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

Agenda

Who  is  Claus  Ibsen?

The  birth  of  Apache  Camel

What  is  Apache  Camel

A  liSle  example

Whats  included  in  the  box?

Running  Camel

Another  Example

The  Camel  Community

Q  and  A

35

Page 36: Apache camel   community day - october 2010

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

A  li<le  example

Based  on  community  user  (Gunnar  Hillert)• hCp://hillert.blogspot.com/2009/09/camellos-­‐discovering-­‐apache-­‐camel-­‐ii.html

Goals• 1)  Pickup  files  from  a  directory

• 2)  Make  sure  we  only  pickup  3  files  per  30  seconds

• 3)  Store  into  JMS  queue

• 4)  Listen  on  JMS  queue

• 5)  And  upload  file  to  FTP  server

36

Page 37: Apache camel   community day - october 2010

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

A  li<le  example

Goals  using  Enterprise  IntegraIon  Pa<erns

Goals• 1)  Pickup  files  from  a  directory

• 2)  Make  sure  we  only  pickup  3  files  per  30  seconds

• 3)  Store  into  JMS  queue

• 4)  Listen  on  JMS  queue

• 5)  And  upload  file  to  FTP  server

1 2 3 4 5

37

Page 38: Apache camel   community day - october 2010

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

A  li<le  example

Goals  using  Enterprise  IntegraIon  Pa<erns

Goals• 1)  Pickup  files  from  a  directory

• 2)  Make  sure  we  only  pickup  3  files  per  30  seconds

• 3)  Store  into  JMS  queue

• 4)  Listen  on  JMS  queue

• 5)  And  upload  file  to  FTP  server

from throttle to from to

38

Page 39: Apache camel   community day - october 2010

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

A  li<le  example

Camel  DSL  in  XML

<camelContext> <route> <from uri="file:camellos/inbox?move=.done"/> <throttle maximumRequestsPerPeriod="3” timePeriodMillis="30000”> <to uri="activemq:queue:camellos"/> </throttle> </route> <route> <from uri="activemq:queue:camellos"/> <to uri="ftp://admin:secret@localhost:3333"/> </route></camelContext>

39

Page 40: Apache camel   community day - october 2010

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

Agenda

Who  is  Claus  Ibsen?

The  birth  of  Apache  Camel

What  is  Apache  Camel

A  li<le  example

Whats  included  in  the  box?

Running  Camel

Another  Example

The  Camel  Community

Q  and  A

40

Page 41: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Highlights  of  whats  included  in  Camel

41

41

Page 42: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

50+  Enterprise  IntegraIon  Pa<erns

42

http://camel.apache.org/enterprise-integration-patterns.html

42

Page 43: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

70+  Components  

43

activemq crypto flatpack irc ldap

activemq-journal cxf freemarker javaspace mail/imap/pop3

amqp cxfrs ftp/ftps/sftp jbi mina

atom dataset gae jcr mock

bean direct hdfs jdbc msv

bean validation esper hibernate jetty nagios

browse event hl7 jms netty

cache exec http jpa nmr

cometd file ibatis jt/400 printer

http://camel.apache.org/components.html

43

Page 44: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

70+  Components  

44

properties scalate stream xslt

quartz seda string-template ejb

quickfix servlet test jasypt

ref smooks timer sip

restlet smpp validation db4o

rmi snmp velocity language

rnc spring-integration vm

rng spring-security xmpp

rss sql xquery

http://camel.apache.org/components.html

44

Page 45: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

18  Data  Formats  

45

bindy protobuf

castor serialization

csv soap

crypto tidy markup

flatpack xml beans

gzip xml security

hl7 xstream

jaxb zip

json dozer

http://camel.apache.org/data-format.html

45

Page 46: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Data  Format

46

from("activemq:QueueWithJavaObjects”) .marshal().jaxb() .to("mq:QueueWithXmlMessages");

46

Page 47: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Predicates  &  Expressions

47

BeanShell PHP

EL Python

Groovy Ruby

JavaScript Simple

JSR 223 SQL

OGNL XPath

MVEL XQuery

http://camel.apache.org/languages.html

47

Page 48: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

DSL  in  3  programming  languages

48

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

from(A) filter(isWidget) --> B

<route> <from ref="A"/> <filter> <xpath>/quote/product = ‘widget’</xpath> <to ref="B"/> </filter></route>

XMLJava

Scala

48

Page 49: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Type  Converters

49

INFO DefaultTypeConverter- Loaded 148 type converters

49

Page 50: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Custom  Type  Converters

50

# META-INF/services/org/apache/camel/TypeConvertercom.acme.converters

META-INF file in the JAR

@Converterpublic class MyTypeConverter { @Converter public String toString(MyOrder order) { StringBuilder sb = new StringBuilder(); ... return sb.toString(); }}

50

Page 51: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Powerful  bean  integraIon• Adapt  to  your  beans

• EIP  as  @annotaIons–@Produce

–@Consume

–@RecipientList

–@Rou6ngSlip

–@DynamicRouter

51

51

Page 52: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Bean  as  Message  Translator

52

52

Page 53: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Bean  as  Message  Translator

53

public class Foo {

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

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

53

Page 54: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Bean  Parameter  Binding

54

public class Foo {

public String processOrder( String orderAsXml, @XPath(”/order/@id”) String oid, @Header(”JMSCorrelationID”) String cid) { ... }}

54

Page 55: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Sending  message

55

public class Foo { @Produce(uri="activemq:foo.bar") ProducerTemplate producer;

public void doSomething() { if (whatever) { producer.sendBody("<hello>world!</hello>"); } }}

55

Page 56: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Receiving  message

56

public class Foo {

@Consume(uri="activemq:cheese") public void onCheese(String name) { ... }}

56

Page 57: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Test  Kit• camel-­‐test.jar

• JUnit  based  (3.x  and  4.x)

• Supports  Spring

• Easy  to  test

• Quick  prototyping

57

57

Page 58: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Test  Kit  from  IDE

58

Right Click -> Run Debug

extend CamelTestSupport

Inline RouteBuilder

58

Page 59: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Managed• JMX  API

• REST  API

59

59

Page 60: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Web  Console• REST  API

60

60

Page 61: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

FuseSource  Rider

61

61

Page 62: Apache camel   community day - october 2010

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

Whats  included  in  the  box?

Summary• 50+  EIP  pa<erns

• 70+  ConnecIvity  components

• 18+  Data  formats

• 14+  Languages

• DSL  in  mulIple  flavors  (Java,  XML,  Scala,  Groovy)

• AutomaIc  type  conversion

• Strong  bean  support

• Test  Kit

• Management  (JMX,  REST)

• Web  console

62

62

Page 63: Apache camel   community day - october 2010

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

Agenda

Who  is  Claus  Ibsen?

The  birth  of  Apache  Camel

What  is  Apache  Camel

A  li<le  example

Whats  included  in  the  box?

Running  Camel

Another  Example

The  Camel  Community

Q  and  A

63

Page 64: Apache camel   community day - october 2010

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

Running  Camel

Riding  the  Camel

64

64

Page 65: Apache camel   community day - october 2010

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

Running  Camel

Lightweight  and  embeddable

Known  Deployment  OpIons• Standalone  Java  ApplicaIon

• Web  ApplicaIon

• J2EE  ApplicaIon

• JBI

• OSGi

• Google  App  Engine

• Java  Web  Start

• Spring  ApplicaIon

65

Known ContainersApache ServiceMixApache ActiveMQApache TomcatJettyJBossIBM WebSphereBEA WebLogicOracle OC4jGAE... others

65

Page 66: Apache camel   community day - october 2010

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

Running  Camel

Java  ApplicaIon

Spring  ApplicaIon

66

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

<camelContext> <package>com.acme</package></camelContext>

66

Page 67: Apache camel   community day - october 2010

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

Running  Camel

OSGi  -­‐  FUSE  ESB

67 !"#$$%"&'()'*++",(-./0'*"1('2('0.3(456

!"#$%&"'%()*+,!-%./01"2+%34"5#04%63

67

Page 68: Apache camel   community day - october 2010

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

Agenda

Who  is  Claus  Ibsen?

The  birth  of  Apache  Camel

What  is  Apache  Camel

A  li<le  example

Whats  included  in  the  box?

Running  Camel

Another  Example

The  Camel  Community

Q  and  A

68

68

Page 69: Apache camel   community day - october 2010

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

Another  Example

Rider  Auto  Parts  Example  by  Jonathan  Anstey

69

http://architects.dzone.com/articles/apache-camel-integration

69

Page 70: Apache camel   community day - october 2010

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

Another  Example

Rider  Auto  Parts  Example  -­‐  3  Routes

70

1

70

Page 71: Apache camel   community day - october 2010

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

Another  Example

Rider  Auto  Parts  Example  -­‐  3  Routes

71

1

2

71

Page 72: Apache camel   community day - october 2010

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

Another  Example

Rider  Auto  Parts  Example  -­‐  3  Routes

72

1

2 3

72

Page 73: Apache camel   community day - october 2010

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

Another  Example

Rider  Auto  Parts  Example  -­‐  1st  Route

73

from

to

public class Route1 extends RouteBuilder {

public void configure() throws Exception { from("ftp:[email protected]?password=secret") .to("activemq:queue:incoming"); }}

1

73

Page 74: Apache camel   community day - october 2010

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

Another  Example

Rider  Auto  Parts  Example  -­‐  2nd  Route

74

tofrom

public class Route2 extends RouteBuilder {

public void configure() throws Exception { from("jetty:http://localhost:8080/orders") .inOnly("activemq:queue:incoming") .transform().constant("OK"); }}

2

74

Page 75: Apache camel   community day - october 2010

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

Another  Example

Rider  Auto  Parts  Example  -­‐  3rd  Route

75

from to

choice

route on next slide

3

75

Page 76: Apache camel   community day - october 2010

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

Another  Example

Rider  Auto  Parts  Example  -­‐  3rd  Route

76

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") }}

76

Page 77: Apache camel   community day - october 2010

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

Agenda

Who  is  Claus  Ibsen?

The  birth  of  Apache  Camel

What  is  Apache  Camel

A  li<le  example

Whats  included  in  the  box?

Running  Camel

Another  Example

The  Camel  Community

Q  and  A

77

Page 78: Apache camel   community day - october 2010

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

The  Camel  Community

Camel  website• 52%  increase  (2010  over  2009)

• Average  2200  visits  per  weekday  (2000  -­‐  2500)

High  acIvity  on  mailing  list

78

Page 79: Apache camel   community day - october 2010

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

The  Camel  Community

20  commi<ers

High  commit  acIvity

79

Page 80: Apache camel   community day - october 2010

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

The  Camel  Community

Books• Manning  top-­‐15  year  to  date  (2010)

#10

80

Page 81: Apache camel   community day - october 2010

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

The  Camel  Community

Issue  Tracker

Total 3215

Open 145 (5%)

Resolved 3070 (95%)

Bugs 4 (3% open)

Oldest Bug Dec 2009

Oct 11th 2010

81

Page 82: Apache camel   community day - october 2010

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

The  Camel  Community

A  lot  in  each  new  release

Release Date Tickets

Camel 2.0 Aug 2009 760

Camel 2.1 Dec 2009 303

Camel 2.2 Feb 2010 180

Camel 2.3 May 2010 273

Camel 2.4 July 2010 182

Camel 2.5 Oct 2010 270+

82

Page 83: Apache camel   community day - october 2010

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

The  Camel  Community

3rd  party  integraIng  Camel• Apache  ServiceMix• Apache  AcIveMQ• Apache  James• OpenESB• Progress  AcIonal  DiagnosIcs• FuseHQ• Open  eHealth  IntegraIon  Plaqorm• Grails  Camel  Plugin• Play  Framework• Akka• Scalate• JBoss  Drools• JBoss  ESB

In ProgressSmooksDoozer

83

Page 84: Apache camel   community day - october 2010

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

Agenda

Who  is  Claus  Ibsen?

The  birth  of  Apache  Camel

What  is  Apache  Camel

A  li<le  example

Whats  included  in  the  box?

Running  Camel

Another  Example

The  Camel  Community

Q  and  A

84

Page 85: Apache camel   community day - october 2010

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

Where  do  I  get  more  informaIon?– Camel  website:  hCp://camel.apache.org

– Camel  ar6cle:  hCp://architects.dzone.com/ar6cles/apache-­‐camel-­‐integra6on

– FUSE  website:  hCp://fusesource.com– Camel  in  Ac6on  book:  hCp://manning.com/ibsen

Q  and  A

85

Page 86: Apache camel   community day - october 2010

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

Q  and  A

?86