13
A first taste of integration with Apache Camel

A first taste of integration with Apache Camel

Embed Size (px)

Citation preview

A first taste of integration withApache Camel

Apache Camel

is a powerful Open Source Integration Framework

based on known Enterprise Integration Patterns

– Johnathan Anstey, co-author Camel In Action

Concise

Application

Messaging

Exchange

Language

Enterprise Integration Patterns Do you speak it?

http://enterpriseintegrationpatterns.com

More than 50 implemented EIPs

Example import orders from legacy system

Spring XML <route> <from uri=“ftp://admin@localhost/orders?move=done“/> <wireTap uri=“file:/orders/inbound“/> <unmarshal> <xstream> <aliases> <alias name="order" class=“com.demo.Order"/> </aliases> </xstream> </unmarshal> <choice> <when> <simple>${body.cost} &gt; 1000</simple> <to uri="jms:ordersToReview"/> </when> <otherwise> <to uri="jms:orders"/> </otherwise> </choice> </route>

Java DSL

XStream xStream = new XStream();xStream.alias("order", Order.class);from(“ftp://admin@localhost/orders?move=done“) .wireTap(“file:/orders/inbound“) .unmarshal(new XStreamDataFormat(xStream)) .choice() .when(simple("${body.cost} > 1000")) .to("jms:ordersToReview") .otherwise() .to("jms:orders");

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

More than 200 components

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

More than 30 built-in data formats

XMLJSON

Zip

SoapXmlJson

CSV

BeanIOEDI

Protobuf

GZip

Crypto

PGP

Base64RSS

iCALBarcode

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

Expression languages

DEMOhttps://github.com/niels-s/camel-demo

Questions?

@[email protected]