Your SlideShare is downloading. ×
Camel overview
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Camel overview

363
views

Published on


0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
363
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Camel Overview
  • 2. Apa itu Apache Camel?
  • 3. Apache camel (Fuse Mediation Router) merupakansebuah integrasi frameworkopensourceberdasarkan Enterprise Integration Patterns.Apache camel jugamenyediakan bahasa (DSL) untuk mendefinisikan routing.Misalnya,ada file baru diupload,kemudian parsing,insert ke database lalu kirim notifikasi.Camel menggunakanURI untuk bekerja secara langsung dengan segala jenis Transportasi atau modelmessaging seperti HTTP,ActiveMQ,JMS,JBI,SCA,MINA atau CXF,serta komponenpluggable dan pilihan formatdata,camel juga merupakan sebuah perpustakaan kecildengan defendensi minimal untuk embeding dalam aplikasi java.camel memungkinkananda bekerja dengan API yang sama terlepas dari jeis transport yangdigunakan,jadi belajar API sekali dan anda bisa berinteraksi dengan semuakomponen yang di sediaka di out-of-box.Proyek-proyek berikut dapatmemanfaatkan Apache Camel sebagai routing dan mesin mediasi.- Apache Servicemix -ESB dan JBI kontainer-Apache ActiveMQ -banyak digunakan sumber broker-Apache Karaf – runtime OSGI kecil berbasis dimana aplkasi dapat digunakan-Apache Mina – Kinerja tinggi NIO berbasis Framework jaringan
  • 4. Enterprise Integration Patterns Dalam Camel Terdiri Dari :Messaging SystemMessaging ChannelsMessage ContructionMessage RoutingMessage TransformationMessage Endpoints danSystem Management
  • 5. Enterprise Integration Pattern
  • 6. Integrasi Camel dan EIP from(“a”).to(“b”)
  • 7. from(“a”).choice().when(). method(“controlBean”,“isOK”). to(“x”).end().pipeline(“b”, “c”, “d”); Meruvian Hunabku Team
  • 8. Komponen Camel
  • 9. Endpoint URI <component-name>:<component-spec>[?params]from(“file:/tmp?consumer.delay=1000”)from(“bean:myBean?methodName=getOrders”)from(“quickfix-server:server.cfg?log=#loggingFactoryBean”)
  • 10. Filter Route – Java DSL 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"); }} 
  • 11. Filter Route – Java DSLpublic 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); }import org.apache.camel.builder.RouteBuilder;import static org.apache.camel.builder.xml.XPathBuilder.xpath;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); } }
  • 12. Content Based Router
  • 13. Content Based Router
  • 14. Message Filter
  • 15. Splitter
  • 16. Bean sebagai Message Translator
  • 17. Aggregator
  • 18. Resequencer
  • 19. Routing Slip
  • 20. Error Handling
  • 21. try … catch … finally
  • 22. Message-Driven POJO
  • 23. Camel dan ActiveMQ${ACTIVEMQ_HOME}/conf/activemq.xml<camelContext id=“camel” xmlns=“http://camel.apache.org/schema/spring”> <route> <!-- you can add routes here --> </route></camelContext>
  • 24. ELVISDOTCOM333

×