45
Apache Camel Smart Enterprise Application Integration Kai Wähner MaibornWolff et al GmbH 145 Martin Huber innoQ Deutschland GmbH 145

Jazoon 2011 - Smart EAI with Apache Camel

Embed Size (px)

DESCRIPTION

Introduction to Apache Camel. Explains its concepts and why / when you should use it.I held the session together w

Citation preview

Page 1: Jazoon 2011 - Smart EAI with Apache Camel

Apache Camel Smart Enterprise Application Integration

Kai Wähner MaibornWolff et al GmbH 145

Martin Huber innoQ Deutschland GmbH 145

Page 2: Jazoon 2011 - Smart EAI with Apache Camel

2

Intention of this Session

Bullet Point

Boot Camp

Page 3: Jazoon 2011 - Smart EAI with Apache Camel

3

Intention of this Session

Page 4: Jazoon 2011 - Smart EAI with Apache Camel

4

What is the Problem?

Page 5: Jazoon 2011 - Smart EAI with Apache Camel

5

Heterogeneity

Page 6: Jazoon 2011 - Smart EAI with Apache Camel

6

Spaghetti Solutions

http://jimwebber.org/

Page 7: Jazoon 2011 - Smart EAI with Apache Camel

7

Spaghetti Solutions

http://jimwebber.org/

Page 8: Jazoon 2011 - Smart EAI with Apache Camel

8

Spaghetti Solutions

http://jimwebber.org/

Page 9: Jazoon 2011 - Smart EAI with Apache Camel

9

Spaghetti Inside …

http://jimwebber.org/

Page 10: Jazoon 2011 - Smart EAI with Apache Camel

10

Spaghetti Solutions … Better but:

http://jimwebber.org/

Page 11: Jazoon 2011 - Smart EAI with Apache Camel

11

Wishes

Page 12: Jazoon 2011 - Smart EAI with Apache Camel

12

Solution: Enterprise Application Integration (EAI)

How to read the Content of a File?

try { BufferedReader in = new BufferedReader(new

FileReader(“filename")); String str; while ((str = in.readLine()) != null) { process(str); }

in.close(); }

catch (IOException e) { }

Page 13: Jazoon 2011 - Smart EAI with Apache Camel

13

What is the Key Message?

Page 14: Jazoon 2011 - Smart EAI with Apache Camel

14

Key Message

Page 15: Jazoon 2011 - Smart EAI with Apache Camel

15

Key Message

Page 16: Jazoon 2011 - Smart EAI with Apache Camel

16

Key Message

Page 17: Jazoon 2011 - Smart EAI with Apache Camel

17

Agenda

Page 18: Jazoon 2011 - Smart EAI with Apache Camel

18

Agenda

1) What is Enterprise Integration Patterns?

Page 19: Jazoon 2011 - Smart EAI with Apache Camel

19

Enterprise Integration Patterns (EIP)

Page 20: Jazoon 2011 - Smart EAI with Apache Camel

20

Enterprise Integration Patterns (EIP)

Page 21: Jazoon 2011 - Smart EAI with Apache Camel

21

Enterprise Integration Patterns

Page 22: Jazoon 2011 - Smart EAI with Apache Camel

22

Agenda

2) What is Apache Camel?

Page 23: Jazoon 2011 - Smart EAI with Apache Camel

23

Apache Camel

Page 24: Jazoon 2011 - Smart EAI with Apache Camel

24

Apache Camel

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

Page 25: Jazoon 2011 - Smart EAI with Apache Camel

25

Apache Camel … on Routes!

Page 26: Jazoon 2011 - Smart EAI with Apache Camel

26

Code Example (Java DSL)

from("activemq:queue:order“)

.choice()

.when(header("paytype").isEqualTo("creditcard")) .to(“websphere-mq:queue:creditcards")

.when(header("paytype").isEqualTo("bankcard")) .to("smtp://mwea.mailserver:30

?password=xy&user=kw")

.otherwise() .to(“websphere-mq:queue:invalidOrder");

Page 27: Jazoon 2011 - Smart EAI with Apache Camel

27

Agenda

3) Use Case for Demo

Page 28: Jazoon 2011 - Smart EAI with Apache Camel

Use Case

Page 29: Jazoon 2011 - Smart EAI with Apache Camel

29

Use Case (EIP Perspective)

Page 30: Jazoon 2011 - Smart EAI with Apache Camel

30

Agenda

4) LIVE HACKING: Apache Camel

Page 31: Jazoon 2011 - Smart EAI with Apache Camel

31

Live Demo

Page 32: Jazoon 2011 - Smart EAI with Apache Camel

32

Agenda

5) Outlook

Page 33: Jazoon 2011 - Smart EAI with Apache Camel

33

Choose your favorite DSL

Page 34: Jazoon 2011 - Smart EAI with Apache Camel

34

Many Components available

HTTP

FTP File

XSLT

MQ

JDBC

Akka

TCP SMTP

RSS Quartz

Log

LDAP

JMS

EJB

AMQP

Atom AWS-S3

Bean-Validation CXF IRC

Jetty

JMX

Lucene

Netty

RMI

SQL

Many many more ... Own custom Components...

Page 35: Jazoon 2011 - Smart EAI with Apache Camel

35

Deploy it wherever you need to!

Standalone

OSGi

Application Server

Web Container Spring Container

Page 36: Jazoon 2011 - Smart EAI with Apache Camel

36

Enterprise-ready!

Page 37: Jazoon 2011 - Smart EAI with Apache Camel

37

When to use Apache Camel?

Complexity of Integration

Low High

Apache Camel

Enterprise Service Bus (ESB)

No Tool

Page 38: Jazoon 2011 - Smart EAI with Apache Camel

38

And the Winner is …

Page 39: Jazoon 2011 - Smart EAI with Apache Camel

39

Did the Key Message arrive?

Page 40: Jazoon 2011 - Smart EAI with Apache Camel

40

Key Message

Page 41: Jazoon 2011 - Smart EAI with Apache Camel

41

Did the Key Message arrive?

Page 42: Jazoon 2011 - Smart EAI with Apache Camel

42

When your Appetite?

Page 43: Jazoon 2011 - Smart EAI with Apache Camel

43

Get a Part of the Community!

Page 44: Jazoon 2011 - Smart EAI with Apache Camel

44

Thank you for your Attention … Questions?

= Smart Enterprise Application Integration +

Page 45: Jazoon 2011 - Smart EAI with Apache Camel

Kai Wähner www.mwea.de MaibornWolff et al GmbH [email protected]

@KaiWaehner

Martin Huber www.innoq.com innoQ GmbH [email protected] @waterback