SlideShare a Scribd company logo
1 of 48
Download to read offline
Service Oriented Integration
 With Apache ServiceMix
        Bruce Snyder
        bsnyder@apache.org
        7 Nov 2008
        New Orleans, Louisiana
Agenda

• Enterprise Service Bus
• Java Business Integration
• Apache ServiceMix ESB
• ServiceMix 4
Integration is Messy!
What is an
 ESB?
What is an ESB?


quot;An Enterprise Service Bus (ESB) is a new architecture
that exploits Web services, messaging middleware,
intelligent routing, and transformation. ESBs act as a
lightweight, ubiquitous integration backbone through
which software services and application components
flow.”
(Gartner)
What is an ESB?

An ESB acts as a shared messaging layer for connecting
applications and other services throughout an enterprise
computing infrastructure. It supplements its core
asynchronous messaging backbone with intelligent
transformation and routing to ensure messages are
passed reliably. Services participate in the ESB using
either web services messaging standards or JMS
(LooselyCoupled.com)
What is an ESB?

An ESB is an open standards, message-based,
distributed, integration solution that provides routing,
invocation, and mediation services to facilitate the
interactions of disparate distributed information
technology resources (applications, services,
information, platforms) in a reliable manner.
(Brenda Michelson, Elemental Links)
Do I need an ESB?


               ESB-oriented architecture:
          The wrong approach to adopting SOA



http://www.ibm.com/developerworks/webservices/library/ws-soa-esbarch/index.html?ca=drs-
Use a Planning Process

   ESB Planning Process
What is
 JBI?
What is JBI?


JBI defines an architecture that allows the construction
of integration systems from plug-in components, that
interoperate through the method of mediated message
exchange.
(JBI 1.0 Spec)
Java Business Integration
Java Business Integration
JBI Normalized Message
JBI Packaging
Apache ServiceMix




http://servicemix.apache.org/
Apache ServiceMix
   Architecture
ServiceMix Features
• Supports many protocols
  – File, FTP, HTTP/S, JMS, SMTP, SOAP, TCP, XMPP
• Supports many engines
  – Apache Camel, Apache CXF, Apache ODE, Drools,
    OS Workflow, POJOs, Quartz, Scripting, Saxon
    XQuery and XSLT, WS-Notification
• Supports Security
  – JAAS, WS-Security
• Web Container/App Server Integration
  – Geronimo, JBoss, Jetty, Tomcat, Weblogic,
    Websphere
Apache Software
  Foundation
Message Routing
Message Routing
Example
Configuration
The File Poller
<beans xmlns:file='http://servicemix.apache.org/file/1.0'
       xmlns:test=quot;urn:testquot;>

  <file:poller service=quot;test:filequot;
               endpoint=quot;endpointquot;
               targetService=quot;test:wiretapInquot;
               file=quot;/Users/bsnyder/smxdropboxquot;>

</beans>
The Wiretap
<beans xmlns:eip=quot;http://servicemix.apache.org/eip/1.0quot;
       xmlns:test=quot;urn:testquot; >

 <eip:wire-tap service=quot;test:wiretapInquot; endpoint=quot;endpointquot;>
   <eip:target>
     <eip:exchange-target service=quot;test:cbrquot; />
   </eip:target>
   <eip:inListener>
     <eip:exchange-target service=quot;test:loggerquot; />
   </eip:inListener>
 </eip:wire-tap>

</beans>
The Logger
    public class MyLogger extends RouteBuilder {
    public void configure() {
        from(quot;jbi:service:urn:test:loggerquot;).
        process(new Processor() {
            public void process(Exchange exchange) {
                Message in = exchange.getIn();
                in.setBody(in.getBody(String.class) +
                        quot;<foo>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</foo>quot;);
            }
        })
        to(quot;log:demoquot;);
    }
}
The Logger
    <beans xmlns=quot;http://www.springframework.org/schema/beansquot;
       xmlns:xsi=quot;http://www.w3.org/2001/XMLSchema-instancequot;
       xsi:schemaLocation=quot;
       http://www.springframework.org/schema/beans
         http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://activemq.apache.org/camel/schema/spring
         http://activemq.apache.org/camel/schema/spring/camel-spring.xsdquot;>

  <camelContext id=quot;camelquot;
                xmlns=quot;http://activemq.apache.org/camel/schema/springquot;>
    <package>com.mycompany</package>
  </camelContext>
</beans>
The Content-Based Router
<beans xmlns:eip=quot;http://servicemix.apache.org/eip/1.0quot;
       xmlns:test=quot;urn:testquot;>

  <eip:content-based-router service=quot;test:cbrquot;
    endpoint=quot;endpointquot;>
    <eip:rules>
      <eip:routing-rule>
        <eip:predicate>
          <eip:xpath-predicate
            xpath=quot;/message/cheese/text() = 'gouda'quot; />
        </eip:predicate>
        <eip:target>
          <eip:exchange-target service=quot;test:queue1quot; />
        </eip:target>
      </eip:routing-rule>
...
The Content-Based Router
...
      <eip:routing-rule>
        <eip:predicate>
          <eip:xpath-predicate
            xpath=quot;/message/cheese/text() = 'swiss'quot; />
        </eip:predicate>
        <eip:target>
          <eip:exchange-target service=quot;test:queue2quot; />
        </eip:target>
      </eip:routing-rule>
      <eip:routing-rule>
        <eip:target>
          <eip:exchange-target service=quot;test:queue3quot; />
        </eip:target>
      </eip:routing-rule>
    </eip:rules>
  </eip:content-based-router>
The JMS Sender
<beans xmlns:jms=quot;http://servicemix.apache.org/jms/1.0quot;
       xmlns:test=quot;urn:test”
       xmlns:amq=quot;http://activemq.org/config/1.0quot;>

    <jms:endpoint service=quot;test:queue1quot;
                  endpoint=quot;myProviderquot;
                  role=quot;providerquot;
                  destinationStyle=quot;queuequot;
                  jmsProviderDestinationName=quot;queue1quot;
                  connectionFactory=quot;#connectionFactoryquot; />

    <jms:endpoint service=quot;test:queue2quot;
                  endpoint=quot;myProviderquot;
                  role=quot;providerquot;
                  destinationStyle=quot;queuequot;
                  jmsProviderDestinationName=quot;queue2quot;
                  connectionFactory=quot;#connectionFactoryquot;/>
The JMS Sender
...
      <jms:endpoint service=quot;test:queue3quot;
                    endpoint=quot;myProviderquot;
                    role=quot;providerquot;
                    destinationStyle=quot;queuequot;
                    jmsProviderDestinationName=quot;queue3quot;
                    connectionFactory=quot;#connectionFactoryquot;/>

      <amq:connectionFactory id=quot;connectionFactoryquot;
        brokerURL=quot;tcp://localhost:61616quot; />

</beans>
Example
JBI Packaging
DEMO

• ServiceMix demo
Visualization
Distribution of
ServiceMix Containers
Apache
ServiceMix
    4.0
Lessons Learned
           From JBI 1.0
✓ Normalized Exchange and Messages
✓ Normalized Message Router
  ✓ The only way to plug in third party components


๏ XML normalization can be problematic
๏ Packaging/classloaders not very flexible
๏ Creating components is not easy
๏ Not always the best fit for a given API
ServiceMix 4.0
          Building Blocks
• Runtime: OSGi (Apache Felix)
  – JBI support still intact
  – NMR is an OSGi service
• Message Broker: Apache ActiveMQ
• Web Services: Apache CXF
• Routing Engine: Apache Camel
ServiceMix 4 Architecture
ServiceMix 4 Architecture
What is Apache Camel?




http://activemq.apache.org/camel/
What is EIP?
Example Pattern:
Content Based Router



RouteBuilder MyRoute = new RouteBuilder() {
   public void configure() {
     from(quot;activemq:TEST.QUEUEquot;).choice()
      .when(header(quot;fooquot;).isEqualTo(quot;barquot;))
          .to(quot;file:target/fooquot;)
      .when(header(quot;fooquot;).isEqualTo(quot;cheesequot;))
          .to(quot;ftp://myserver:1234/targetquot;)
      .otherwise().to(quot;log:TESTINGquot;);
   }
};
Example Pattern:
Content Based Router
<camelContext id=quot;simpleRouteWithChoicequot;
    xmlns=quot;http://activemq.apache.org/camel/schema/springquot;>
  <route>
    <from uri=quot;activemq:TEST.QUEUEquot;/>
    <choice>
      <when>
        <predicate>
           <header name=quot;fooquot;/>
           <isEqualTo value=quot;barquot;/>
        </predicate>
        <to uri=quot;file:target/fooquot;/>
      </when>
      <when>
        <predicate>
           <header name=quot;fooquot;/>
           <isEqualTo value=quot;cheesequot;/>
        </predicate>
        <to uri=quot;seda:cquot;/>
      </when>
      <otherwise><to uri=quot;seda:dquot;/></otherwise>
    </choice>
  </route>
</camelContext>
Thank You for Attending!




 Questions?

More Related Content

What's hot

Pushing the web — WebSockets
Pushing the web — WebSocketsPushing the web — WebSockets
Pushing the web — WebSockets
Roland M
 
Writing & Using Web Services
Writing & Using Web ServicesWriting & Using Web Services
Writing & Using Web Services
Rajarshi Guha
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
vamsi krishna
 
Ruby on Rails Security
Ruby on Rails SecurityRuby on Rails Security
Ruby on Rails Security
amiable_indian
 
Using Java to implement SOAP Web Services: JAX-WS
Using Java to implement SOAP Web Services: JAX-WS�Using Java to implement SOAP Web Services: JAX-WS�
Using Java to implement SOAP Web Services: JAX-WS
Katrien Verbert
 
JMS and ActiveMQ - VuNV 201307
JMS and ActiveMQ - VuNV 201307JMS and ActiveMQ - VuNV 201307
JMS and ActiveMQ - VuNV 201307
Framgia Vietnam
 

What's hot (20)

RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
WebServices in ServiceMix with CXF
WebServices in ServiceMix with CXFWebServices in ServiceMix with CXF
WebServices in ServiceMix with CXF
 
Asynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and JavaAsynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and Java
 
Web sockets in Java
Web sockets in JavaWeb sockets in Java
Web sockets in Java
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSockets
 
The HTML5 WebSocket API
The HTML5 WebSocket APIThe HTML5 WebSocket API
The HTML5 WebSocket API
 
Pushing the web — WebSockets
Pushing the web — WebSocketsPushing the web — WebSockets
Pushing the web — WebSockets
 
Getting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in JavaGetting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in Java
 
Writing & Using Web Services
Writing & Using Web ServicesWriting & Using Web Services
Writing & Using Web Services
 
Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014
 
Realtime web application with java
Realtime web application with javaRealtime web application with java
Realtime web application with java
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
Load Balancing with Apache
Load Balancing with ApacheLoad Balancing with Apache
Load Balancing with Apache
 
Syer Monitoring Integration And Batch
Syer Monitoring Integration And BatchSyer Monitoring Integration And Batch
Syer Monitoring Integration And Batch
 
Ruby on Rails Security
Ruby on Rails SecurityRuby on Rails Security
Ruby on Rails Security
 
Interoperable Web Services with JAX-WS and WSIT
Interoperable Web Services with JAX-WS and WSITInteroperable Web Services with JAX-WS and WSIT
Interoperable Web Services with JAX-WS and WSIT
 
Tomcatx performance-tuning
Tomcatx performance-tuningTomcatx performance-tuning
Tomcatx performance-tuning
 
Using Java to implement SOAP Web Services: JAX-WS
Using Java to implement SOAP Web Services: JAX-WS�Using Java to implement SOAP Web Services: JAX-WS�
Using Java to implement SOAP Web Services: JAX-WS
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WS
 
JMS and ActiveMQ - VuNV 201307
JMS and ActiveMQ - VuNV 201307JMS and ActiveMQ - VuNV 201307
JMS and ActiveMQ - VuNV 201307
 

Viewers also liked

Apache stratos hangout 3
Apache stratos hangout   3Apache stratos hangout   3
Apache stratos hangout 3
Nirmal Fernando
 
Apache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMixApache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMix
Bruce Snyder
 
Enterprise Application Integration
Enterprise Application IntegrationEnterprise Application Integration
Enterprise Application Integration
Tomas Dermisek
 

Viewers also liked (20)

Mulefundamentals 160503050909
Mulefundamentals 160503050909Mulefundamentals 160503050909
Mulefundamentals 160503050909
 
REST Coder: Auto Generating Client Stubs and Documentation for REST APIs
REST Coder: Auto Generating Client Stubs and Documentation for REST APIsREST Coder: Auto Generating Client Stubs and Documentation for REST APIs
REST Coder: Auto Generating Client Stubs and Documentation for REST APIs
 
Introduction to Apache Synapse
Introduction to Apache SynapseIntroduction to Apache Synapse
Introduction to Apache Synapse
 
Open source vs commercial esb and api management platform draft wh1 for smals
Open source vs commercial esb and api management platform   draft wh1 for smalsOpen source vs commercial esb and api management platform   draft wh1 for smals
Open source vs commercial esb and api management platform draft wh1 for smals
 
Apache stratos hangout 3
Apache stratos hangout   3Apache stratos hangout   3
Apache stratos hangout 3
 
Apache stratos (incubation) technical deep dive
Apache stratos (incubation) technical deep diveApache stratos (incubation) technical deep dive
Apache stratos (incubation) technical deep dive
 
Storm v0.2
Storm v0.2Storm v0.2
Storm v0.2
 
The Rise of the Open Source ESB
The Rise of the Open Source ESBThe Rise of the Open Source ESB
The Rise of the Open Source ESB
 
Apache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMixApache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMix
 
Mule Anypoint API Gateway
Mule Anypoint API GatewayMule Anypoint API Gateway
Mule Anypoint API Gateway
 
Mule ESB Training
Mule ESB TrainingMule ESB Training
Mule ESB Training
 
Apache Camel Introduction & What's in the box
Apache Camel Introduction & What's in the boxApache Camel Introduction & What's in the box
Apache Camel Introduction & What's in the box
 
Esb 4.9.0 release webinar
Esb 4.9.0 release webinarEsb 4.9.0 release webinar
Esb 4.9.0 release webinar
 
ApacheCon EU 2016 - Apache Camel the integration library
ApacheCon EU 2016 - Apache Camel the integration libraryApacheCon EU 2016 - Apache Camel the integration library
ApacheCon EU 2016 - Apache Camel the integration library
 
A Presentation On Enterprise Application Integration
A Presentation On Enterprise Application IntegrationA Presentation On Enterprise Application Integration
A Presentation On Enterprise Application Integration
 
Wso2 esb 5.0.0 product release webinar
Wso2 esb 5.0.0   product release webinarWso2 esb 5.0.0   product release webinar
Wso2 esb 5.0.0 product release webinar
 
Getting started with Enterprise Application Integration (EAI) using Enterpris...
Getting started with Enterprise Application Integration (EAI) using Enterpris...Getting started with Enterprise Application Integration (EAI) using Enterpris...
Getting started with Enterprise Application Integration (EAI) using Enterpris...
 
EAI example
EAI exampleEAI example
EAI example
 
The Past, Present and Future of Enterprise Integration
The Past, Present and Future of  Enterprise IntegrationThe Past, Present and Future of  Enterprise Integration
The Past, Present and Future of Enterprise Integration
 
Enterprise Application Integration
Enterprise Application IntegrationEnterprise Application Integration
Enterprise Application Integration
 

Similar to Service Oriented Integration With ServiceMix

Devclub Servicemix Jevgeni Holodkov 23 04 09
Devclub Servicemix Jevgeni Holodkov 23 04 09Devclub Servicemix Jevgeni Holodkov 23 04 09
Devclub Servicemix Jevgeni Holodkov 23 04 09
helggeist
 
Apache Camel - WJax 2008
Apache Camel - WJax 2008Apache Camel - WJax 2008
Apache Camel - WJax 2008
inovex GmbH
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
Igor Bronovskyy
 
Aspnet2 Overview
Aspnet2 OverviewAspnet2 Overview
Aspnet2 Overview
ajitbergi
 

Similar to Service Oriented Integration With ServiceMix (20)

Riding Apache Camel
Riding Apache CamelRiding Apache Camel
Riding Apache Camel
 
Ridingapachecamel
RidingapachecamelRidingapachecamel
Ridingapachecamel
 
Devclub Servicemix Jevgeni Holodkov 23 04 09
Devclub Servicemix Jevgeni Holodkov 23 04 09Devclub Servicemix Jevgeni Holodkov 23 04 09
Devclub Servicemix Jevgeni Holodkov 23 04 09
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Rapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesRapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devices
 
More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
 
Apache Camel - WJax 2008
Apache Camel - WJax 2008Apache Camel - WJax 2008
Apache Camel - WJax 2008
 
Internet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian ThilmanyInternet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian Thilmany
 
T5 Oli Aro
T5 Oli AroT5 Oli Aro
T5 Oli Aro
 
I Feel Pretty
I Feel PrettyI Feel Pretty
I Feel Pretty
 
Boston Computing Review - Java Server Pages
Boston Computing Review - Java Server PagesBoston Computing Review - Java Server Pages
Boston Computing Review - Java Server Pages
 
Ajax
AjaxAjax
Ajax
 
Deploy Rails Application by Capistrano
Deploy Rails Application by CapistranoDeploy Rails Application by Capistrano
Deploy Rails Application by Capistrano
 
Beyond the Node: Arkestration with Noah
Beyond the Node: Arkestration with NoahBeyond the Node: Arkestration with Noah
Beyond the Node: Arkestration with Noah
 
Orbitz and Spring Webflow Case Study
Orbitz and Spring Webflow Case StudyOrbitz and Spring Webflow Case Study
Orbitz and Spring Webflow Case Study
 
Ajax to the Moon
Ajax to the MoonAjax to the Moon
Ajax to the Moon
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
 
Jsp 01
Jsp 01Jsp 01
Jsp 01
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
 
Aspnet2 Overview
Aspnet2 OverviewAspnet2 Overview
Aspnet2 Overview
 

More from Bruce Snyder

Beyond Horizontal Scalability: Concurrency and Messaging Using Spring
Beyond Horizontal Scalability: Concurrency and Messaging Using SpringBeyond Horizontal Scalability: Concurrency and Messaging Using Spring
Beyond Horizontal Scalability: Concurrency and Messaging Using Spring
Bruce Snyder
 
Enterprise Messaging With Spring JMS
Enterprise Messaging With Spring JMSEnterprise Messaging With Spring JMS
Enterprise Messaging With Spring JMS
Bruce Snyder
 
Styles of Applicaton Integration Using Spring
Styles of Applicaton Integration Using SpringStyles of Applicaton Integration Using Spring
Styles of Applicaton Integration Using Spring
Bruce Snyder
 
ActiveMQ In Action
ActiveMQ In ActionActiveMQ In Action
ActiveMQ In Action
Bruce Snyder
 
ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011
Bruce Snyder
 
Using Enterprise Integration Patterns as Your Camel Jockey
Using Enterprise Integration Patterns as Your Camel JockeyUsing Enterprise Integration Patterns as Your Camel Jockey
Using Enterprise Integration Patterns as Your Camel Jockey
Bruce Snyder
 
Messaging With Apache ActiveMQ
Messaging With Apache ActiveMQMessaging With Apache ActiveMQ
Messaging With Apache ActiveMQ
Bruce Snyder
 
Enterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSEnterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMS
Bruce Snyder
 
Taking Apache Camel For a Ride
Taking Apache Camel For a RideTaking Apache Camel For a Ride
Taking Apache Camel For a Ride
Bruce Snyder
 

More from Bruce Snyder (13)

Beyond Horizontal Scalability: Concurrency and Messaging Using Spring
Beyond Horizontal Scalability: Concurrency and Messaging Using SpringBeyond Horizontal Scalability: Concurrency and Messaging Using Spring
Beyond Horizontal Scalability: Concurrency and Messaging Using Spring
 
Enterprise Messaging With Spring JMS
Enterprise Messaging With Spring JMSEnterprise Messaging With Spring JMS
Enterprise Messaging With Spring JMS
 
Styles of Applicaton Integration Using Spring
Styles of Applicaton Integration Using SpringStyles of Applicaton Integration Using Spring
Styles of Applicaton Integration Using Spring
 
ActiveMQ In Action
ActiveMQ In ActionActiveMQ In Action
ActiveMQ In Action
 
ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011
 
Using Enterprise Integration Patterns as Your Camel Jockey
Using Enterprise Integration Patterns as Your Camel JockeyUsing Enterprise Integration Patterns as Your Camel Jockey
Using Enterprise Integration Patterns as Your Camel Jockey
 
Messaging With Apache ActiveMQ
Messaging With Apache ActiveMQMessaging With Apache ActiveMQ
Messaging With Apache ActiveMQ
 
Enterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSEnterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMS
 
Taking Apache Camel For a Ride
Taking Apache Camel For a RideTaking Apache Camel For a Ride
Taking Apache Camel For a Ride
 
EIP In Practice
EIP In PracticeEIP In Practice
EIP In Practice
 
Taking Apache Camel For A Ride
Taking Apache Camel For A RideTaking Apache Camel For A Ride
Taking Apache Camel For A Ride
 
Messaging With ActiveMQ
Messaging With ActiveMQMessaging With ActiveMQ
Messaging With ActiveMQ
 
Taking Apache Camel For A Ride
Taking Apache Camel For A RideTaking Apache Camel For A Ride
Taking Apache Camel For A Ride
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Service Oriented Integration With ServiceMix

  • 1. Service Oriented Integration With Apache ServiceMix Bruce Snyder bsnyder@apache.org 7 Nov 2008 New Orleans, Louisiana
  • 2. Agenda • Enterprise Service Bus • Java Business Integration • Apache ServiceMix ESB • ServiceMix 4
  • 3.
  • 5.
  • 6. What is an ESB?
  • 7. What is an ESB? quot;An Enterprise Service Bus (ESB) is a new architecture that exploits Web services, messaging middleware, intelligent routing, and transformation. ESBs act as a lightweight, ubiquitous integration backbone through which software services and application components flow.” (Gartner)
  • 8. What is an ESB? An ESB acts as a shared messaging layer for connecting applications and other services throughout an enterprise computing infrastructure. It supplements its core asynchronous messaging backbone with intelligent transformation and routing to ensure messages are passed reliably. Services participate in the ESB using either web services messaging standards or JMS (LooselyCoupled.com)
  • 9. What is an ESB? An ESB is an open standards, message-based, distributed, integration solution that provides routing, invocation, and mediation services to facilitate the interactions of disparate distributed information technology resources (applications, services, information, platforms) in a reliable manner. (Brenda Michelson, Elemental Links)
  • 10. Do I need an ESB? ESB-oriented architecture: The wrong approach to adopting SOA http://www.ibm.com/developerworks/webservices/library/ws-soa-esbarch/index.html?ca=drs-
  • 11. Use a Planning Process ESB Planning Process
  • 13. What is JBI? JBI defines an architecture that allows the construction of integration systems from plug-in components, that interoperate through the method of mediated message exchange. (JBI 1.0 Spec)
  • 19. Apache ServiceMix Architecture
  • 20. ServiceMix Features • Supports many protocols – File, FTP, HTTP/S, JMS, SMTP, SOAP, TCP, XMPP • Supports many engines – Apache Camel, Apache CXF, Apache ODE, Drools, OS Workflow, POJOs, Quartz, Scripting, Saxon XQuery and XSLT, WS-Notification • Supports Security – JAAS, WS-Security • Web Container/App Server Integration – Geronimo, JBoss, Jetty, Tomcat, Weblogic, Websphere
  • 21. Apache Software Foundation
  • 26. The File Poller <beans xmlns:file='http://servicemix.apache.org/file/1.0' xmlns:test=quot;urn:testquot;> <file:poller service=quot;test:filequot; endpoint=quot;endpointquot; targetService=quot;test:wiretapInquot; file=quot;/Users/bsnyder/smxdropboxquot;> </beans>
  • 27. The Wiretap <beans xmlns:eip=quot;http://servicemix.apache.org/eip/1.0quot; xmlns:test=quot;urn:testquot; > <eip:wire-tap service=quot;test:wiretapInquot; endpoint=quot;endpointquot;> <eip:target> <eip:exchange-target service=quot;test:cbrquot; /> </eip:target> <eip:inListener> <eip:exchange-target service=quot;test:loggerquot; /> </eip:inListener> </eip:wire-tap> </beans>
  • 28. The Logger public class MyLogger extends RouteBuilder { public void configure() { from(quot;jbi:service:urn:test:loggerquot;). process(new Processor() { public void process(Exchange exchange) { Message in = exchange.getIn(); in.setBody(in.getBody(String.class) + quot;<foo>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</foo>quot;); } }) to(quot;log:demoquot;); } }
  • 29. The Logger <beans xmlns=quot;http://www.springframework.org/schema/beansquot; xmlns:xsi=quot;http://www.w3.org/2001/XMLSchema-instancequot; xsi:schemaLocation=quot; http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsdquot;> <camelContext id=quot;camelquot; xmlns=quot;http://activemq.apache.org/camel/schema/springquot;> <package>com.mycompany</package> </camelContext> </beans>
  • 30. The Content-Based Router <beans xmlns:eip=quot;http://servicemix.apache.org/eip/1.0quot; xmlns:test=quot;urn:testquot;> <eip:content-based-router service=quot;test:cbrquot; endpoint=quot;endpointquot;> <eip:rules> <eip:routing-rule> <eip:predicate> <eip:xpath-predicate xpath=quot;/message/cheese/text() = 'gouda'quot; /> </eip:predicate> <eip:target> <eip:exchange-target service=quot;test:queue1quot; /> </eip:target> </eip:routing-rule> ...
  • 31. The Content-Based Router ... <eip:routing-rule> <eip:predicate> <eip:xpath-predicate xpath=quot;/message/cheese/text() = 'swiss'quot; /> </eip:predicate> <eip:target> <eip:exchange-target service=quot;test:queue2quot; /> </eip:target> </eip:routing-rule> <eip:routing-rule> <eip:target> <eip:exchange-target service=quot;test:queue3quot; /> </eip:target> </eip:routing-rule> </eip:rules> </eip:content-based-router>
  • 32. The JMS Sender <beans xmlns:jms=quot;http://servicemix.apache.org/jms/1.0quot; xmlns:test=quot;urn:test” xmlns:amq=quot;http://activemq.org/config/1.0quot;> <jms:endpoint service=quot;test:queue1quot; endpoint=quot;myProviderquot; role=quot;providerquot; destinationStyle=quot;queuequot; jmsProviderDestinationName=quot;queue1quot; connectionFactory=quot;#connectionFactoryquot; /> <jms:endpoint service=quot;test:queue2quot; endpoint=quot;myProviderquot; role=quot;providerquot; destinationStyle=quot;queuequot; jmsProviderDestinationName=quot;queue2quot; connectionFactory=quot;#connectionFactoryquot;/>
  • 33. The JMS Sender ... <jms:endpoint service=quot;test:queue3quot; endpoint=quot;myProviderquot; role=quot;providerquot; destinationStyle=quot;queuequot; jmsProviderDestinationName=quot;queue3quot; connectionFactory=quot;#connectionFactoryquot;/> <amq:connectionFactory id=quot;connectionFactoryquot; brokerURL=quot;tcp://localhost:61616quot; /> </beans>
  • 40. Lessons Learned From JBI 1.0 ✓ Normalized Exchange and Messages ✓ Normalized Message Router ✓ The only way to plug in third party components ๏ XML normalization can be problematic ๏ Packaging/classloaders not very flexible ๏ Creating components is not easy ๏ Not always the best fit for a given API
  • 41. ServiceMix 4.0 Building Blocks • Runtime: OSGi (Apache Felix) – JBI support still intact – NMR is an OSGi service • Message Broker: Apache ActiveMQ • Web Services: Apache CXF • Routing Engine: Apache Camel
  • 44. What is Apache Camel? http://activemq.apache.org/camel/
  • 46. Example Pattern: Content Based Router RouteBuilder MyRoute = new RouteBuilder() { public void configure() { from(quot;activemq:TEST.QUEUEquot;).choice() .when(header(quot;fooquot;).isEqualTo(quot;barquot;)) .to(quot;file:target/fooquot;) .when(header(quot;fooquot;).isEqualTo(quot;cheesequot;)) .to(quot;ftp://myserver:1234/targetquot;) .otherwise().to(quot;log:TESTINGquot;); } };
  • 47. Example Pattern: Content Based Router <camelContext id=quot;simpleRouteWithChoicequot; xmlns=quot;http://activemq.apache.org/camel/schema/springquot;> <route> <from uri=quot;activemq:TEST.QUEUEquot;/> <choice> <when> <predicate> <header name=quot;fooquot;/> <isEqualTo value=quot;barquot;/> </predicate> <to uri=quot;file:target/fooquot;/> </when> <when> <predicate> <header name=quot;fooquot;/> <isEqualTo value=quot;cheesequot;/> </predicate> <to uri=quot;seda:cquot;/> </when> <otherwise><to uri=quot;seda:dquot;/></otherwise> </choice> </route> </camelContext>
  • 48. Thank You for Attending! Questions?