SlideShare a Scribd company logo
1 of 20
ENTERPRISE INTEGRATION PATTERNS: 
SPRING WAY 
Dragan Gajic
INTEGRATION 
• Creating a single, monolite app to cover 
all aspects of business is hard 
• Enterpises are comprised of 
applications which can be: custom 
build, 3rd party, legacy 
• Connecting computer systems, 
companies or people 
• Share data and processes
INTEGRATION CHALLENGES 
• Networks: unreliable & slow 
• Differences: language, platform & data format 
• Changes 
• Limited control 
• Standards 
• Maintenance
INTEGRATION STYLES 
• File transfer 
• Shared DB 
• RMI 
• Messaging 
• asyncronous 
• reliable transfer 
• common format (messages) 
• Loose coupling
MESSAGE AND CHANNEL 
• Message 
• Header – information about the data 
• Payload (body) – the data being transmitted 
• Channel 
Header 
Payload 
Header 
Payload 
• Point-to-Point 
• Publish-Subscribe 
Header 
Payload 
Header 
Payload 
Header 
Payload 
Producer Consumer
PIPES AND FILTERS 
Persist 
Pipe 
Create validation 
email 
Pipe Pipe 
Filter Filter 
Send validation 
email 
SMTP 
Pipe 
Filter 
USER 
Registration 
• Divide complex processing 
• Filters – independent processing steps 
• Pipes – connect filters into a sequence 
• Fundamental architectural style for messaging 
• Pipe = Channel 
• Filter = Endpoint
SPRING INTEGRATION 
• Top-level project in spring.io 
• Enables lightweight messaging 
• Combines DI, POJO and Messaging 
• Implements most of EIP 
• Includes wide selection of channel adapters 
• SI != MOM, ESB
EXAMPLE: USER REGISTRATION 
• After user registration validate email address by sending 
confirmation link to email and notify moderators about new 
profile 
• In steps: 
• Generate confirmation link (UUID) 
• Store userId -> UUID 
• Send confirmation email 
• Notify site moderators about the new profile 
SMTP 
ADMIN 
REST API
CHANNEL ADAPTER 
@RequestMapping(method = RequestMethod.POST) 
@ResponseStatus(HttpStatus.CREATED) 
public ProfileResource register(@Valid @RequestBody RegistrationResource registration) { 
Profile profile = profileService.save(regResToProfile.convert(registration)); 
publisher.publishEvent(new RegistrationEvent(this, profile)); 
return profileToProfileResource.convert(profile); 
} 
<int-event:inbound-channel-adapter channel="event-channel" 
event-types=“x.x.RegistrationEvent"/> 
<channel id="event-channel“ />
ENRICHER 
<header-enricher input-channel="event-channel"> 
<header name="uuid“ expression="T(java.util.UUID).randomUUID.toString()"/> 
</header-enricher>
WIRE-TAP 
<wire-tap channel="logger"/>
PIPING IT ALL TOGETHER 
<int-event:inbound-channel-adapter channel="event-channel" 
event-types="com.levi9.samples.eip.registration.event.RegistrationEvent" /> 
<channel id="event-channel" /> 
<header-enricher input-channel="event-channel" output-channel=“logger"> 
<header name="uuid" expression="T(java.util.UUID).randomUUID().toString()" /> 
</header-enricher> 
<logging-channel-adapter id="logger" level="INFO" log-full-message="true" />
COMPOSITE PROCESSOR
SPLITTER & ROUTER 
<splitter input-channel="confirmation-channel“ output-channel="splitted" method="split"> 
<beans:bean class="com.levi9.samples.eip.registration.splitter.ProfileSplitter" /> 
</splitter> 
<payload-type-router input-channel="splitted"> 
<mapping type="java.lang.Long" channel="save" /> 
<mapping type="com.levi9.samples.eip.registration.model.Profile" channel=“email" /> 
</payload-type-router> 
public Object[] split(RegistrationEvent event) { 
Profile profile = event.getProfile(); 
return new Object[] {profile.getId(), profile}; 
}
<service-activator input-channel="save" output-channel="done" 
expression="@profileService.pending(headers.uuid, payload)" /> 
<chain input-channel="email" output-channel="done"> 
<int-mail:header-enricher> 
<int-mail:from value="EIP" /> 
<int-mail:to expression="payload.email" /> 
<int-mail:subject value="Registration confirmation" /> 
</int-mail:header-enricher> 
<transformer 
expression="'Dear ' + payload.name + ', please click on the following link 
#{ environment['host.name'] }/confirm/' + headers.uuid 
+ ' in order to confirm email address.'" /> 
</chain> 
SERVICE ACTIVATOR & TRANSLATOR 
public boolean pending(String uuid, Long id) { 
return confirmations.put(uuid, id) == null; 
}
AGGREGATOR & MAIL ADAPTER 
public String aggregate(List<Message<?>> messages) { 
return (String) messages 
.stream() 
.filter(p -> p.getPayload() instanceof String) 
.findFirst().orElse(null).getPayload(); 
} 
<aggregator input-channel="done" method="aggregate" message-store=“store" 
output-channel="mail-outbound" > 
<bean class="com.levi9.samples.eip.registration.aggregator.ConfirmationAggregator"/> 
</aggregator> 
<channel id="mail-outbound" /> 
<int-mail:outbound-channel-adapter channel="mail-outbound" 
host="#{ environment['mail.smtp.host']}" 
port="#{ environment['mail.smtp.port']}" /> 
<bean id=“store" class="org.springframework.integration.store.SimpleMessageStore" />
MESSAGING SYSTEM 
message 
SMTP 
ADMIN 
REST API
DEMO 
https://gitlab.levi9.com/d.gajic/eip/tree/code3
RESOURCES 
• Book 
• Enterprise Integration Patterns 
• Gregor Hohpe, Bobby Woolf 
• Spring Integration 
• http://projects.spring.io/spring-integration 
• Samples 
• https://gitlab.levi9.com/d.gajic/eip.git 
• Patterns 
• http://www.enterpriseintegrationpatterns.com
Q&A

More Related Content

What's hot

SharePoint 2007 Presentation
SharePoint 2007 PresentationSharePoint 2007 Presentation
SharePoint 2007 Presentation
Ajay Jain
 

What's hot (19)

Microsoft exchange
Microsoft exchangeMicrosoft exchange
Microsoft exchange
 
Content migration Part 1: TERMINALFOUR t44u 2013
Content migration Part 1: TERMINALFOUR t44u 2013Content migration Part 1: TERMINALFOUR t44u 2013
Content migration Part 1: TERMINALFOUR t44u 2013
 
The World Needs an Alternative to SharePoint
The World Needs an Alternative to SharePointThe World Needs an Alternative to SharePoint
The World Needs an Alternative to SharePoint
 
Testing web services
Testing web servicesTesting web services
Testing web services
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
SharePoint 2007 Presentation
SharePoint 2007 PresentationSharePoint 2007 Presentation
SharePoint 2007 Presentation
 
Web API Basics
Web API BasicsWeb API Basics
Web API Basics
 
Newcastle University: Content migration made easy
Newcastle University: Content migration made easyNewcastle University: Content migration made easy
Newcastle University: Content migration made easy
 
ASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVCASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVC
 
10 ways to trigger runbooks from Orchestrator
10 ways to trigger runbooks from Orchestrator10 ways to trigger runbooks from Orchestrator
10 ways to trigger runbooks from Orchestrator
 
Introduction to the Client OM in SharePoint 2010
Introduction to the Client OM in SharePoint 2010Introduction to the Client OM in SharePoint 2010
Introduction to the Client OM in SharePoint 2010
 
REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)
 
Getting Started with Orchestrator and Service Manager
Getting Started with Orchestrator and Service ManagerGetting Started with Orchestrator and Service Manager
Getting Started with Orchestrator and Service Manager
 
SCORCH: Tying it All Together
SCORCH: Tying it All TogetherSCORCH: Tying it All Together
SCORCH: Tying it All Together
 
Tutorial asp.net
Tutorial  asp.netTutorial  asp.net
Tutorial asp.net
 
Build your Business Services using ADF Task Flows
Build your Business Services using ADF Task FlowsBuild your Business Services using ADF Task Flows
Build your Business Services using ADF Task Flows
 
Elements_Architecture_and_Technology.pdf
Elements_Architecture_and_Technology.pdfElements_Architecture_and_Technology.pdf
Elements_Architecture_and_Technology.pdf
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENT
 
How business objects upgrade time can be reduced by 80% and keys to prepare n...
How business objects upgrade time can be reduced by 80% and keys to prepare n...How business objects upgrade time can be reduced by 80% and keys to prepare n...
How business objects upgrade time can be reduced by 80% and keys to prepare n...
 

Similar to Enterprise Integration Patterns - Spring way

Rest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsRest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.js
Carol McDonald
 
Many Faces Of Bi Publisher In Oracle Ebs
Many Faces Of Bi Publisher In Oracle EbsMany Faces Of Bi Publisher In Oracle Ebs
Many Faces Of Bi Publisher In Oracle Ebs
Hossam El-Faxe
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
Kiril Iliev
 

Similar to Enterprise Integration Patterns - Spring way (20)

Webservices Workshop - september 2014
Webservices Workshop -  september 2014Webservices Workshop -  september 2014
Webservices Workshop - september 2014
 
Spring integration
Spring integrationSpring integration
Spring integration
 
RESTful application with JAX-RS and how to expose and test them
RESTful application with JAX-RS and how to expose and test themRESTful application with JAX-RS and how to expose and test them
RESTful application with JAX-RS and how to expose and test them
 
Rest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsRest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.js
 
Rest
RestRest
Rest
 
Wso2 integration platform deep dive eu con 2016
Wso2 integration platform deep dive   eu con 2016Wso2 integration platform deep dive   eu con 2016
Wso2 integration platform deep dive eu con 2016
 
Global Scale ESB with Mule
Global Scale ESB with MuleGlobal Scale ESB with Mule
Global Scale ESB with Mule
 
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep DiveWSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
 
SCIM presentation from CIS 2012
SCIM presentation from CIS 2012SCIM presentation from CIS 2012
SCIM presentation from CIS 2012
 
Postman.ppt
Postman.pptPostman.ppt
Postman.ppt
 
Sprintintegration ajip
Sprintintegration ajipSprintintegration ajip
Sprintintegration ajip
 
RPI Infor Process Automation Presentation
RPI Infor Process Automation PresentationRPI Infor Process Automation Presentation
RPI Infor Process Automation Presentation
 
Many Faces Of Bi Publisher In Oracle Ebs
Many Faces Of Bi Publisher In Oracle EbsMany Faces Of Bi Publisher In Oracle Ebs
Many Faces Of Bi Publisher In Oracle Ebs
 
Spring integration
Spring integrationSpring integration
Spring integration
 
Ruslan Belkin And Sean Dawson on LinkedIn's Network Updates Uncovered
Ruslan Belkin And Sean Dawson on LinkedIn's Network Updates UncoveredRuslan Belkin And Sean Dawson on LinkedIn's Network Updates Uncovered
Ruslan Belkin And Sean Dawson on LinkedIn's Network Updates Uncovered
 
OpenSouthCode 2018 - Integrating your applications easily with Apache Camel
OpenSouthCode 2018 - Integrating your applications easily with Apache CamelOpenSouthCode 2018 - Integrating your applications easily with Apache Camel
OpenSouthCode 2018 - Integrating your applications easily with Apache Camel
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service
 
Deep Dive: Strategic Importance of BaaS
Deep Dive: Strategic Importance of BaaSDeep Dive: Strategic Importance of BaaS
Deep Dive: Strategic Importance of BaaS
 
Ccna v5-S1-Chapter 10
Ccna v5-S1-Chapter 10Ccna v5-S1-Chapter 10
Ccna v5-S1-Chapter 10
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Recently uploaded (20)

Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 

Enterprise Integration Patterns - Spring way

  • 1. ENTERPRISE INTEGRATION PATTERNS: SPRING WAY Dragan Gajic
  • 2. INTEGRATION • Creating a single, monolite app to cover all aspects of business is hard • Enterpises are comprised of applications which can be: custom build, 3rd party, legacy • Connecting computer systems, companies or people • Share data and processes
  • 3. INTEGRATION CHALLENGES • Networks: unreliable & slow • Differences: language, platform & data format • Changes • Limited control • Standards • Maintenance
  • 4. INTEGRATION STYLES • File transfer • Shared DB • RMI • Messaging • asyncronous • reliable transfer • common format (messages) • Loose coupling
  • 5. MESSAGE AND CHANNEL • Message • Header – information about the data • Payload (body) – the data being transmitted • Channel Header Payload Header Payload • Point-to-Point • Publish-Subscribe Header Payload Header Payload Header Payload Producer Consumer
  • 6. PIPES AND FILTERS Persist Pipe Create validation email Pipe Pipe Filter Filter Send validation email SMTP Pipe Filter USER Registration • Divide complex processing • Filters – independent processing steps • Pipes – connect filters into a sequence • Fundamental architectural style for messaging • Pipe = Channel • Filter = Endpoint
  • 7. SPRING INTEGRATION • Top-level project in spring.io • Enables lightweight messaging • Combines DI, POJO and Messaging • Implements most of EIP • Includes wide selection of channel adapters • SI != MOM, ESB
  • 8. EXAMPLE: USER REGISTRATION • After user registration validate email address by sending confirmation link to email and notify moderators about new profile • In steps: • Generate confirmation link (UUID) • Store userId -> UUID • Send confirmation email • Notify site moderators about the new profile SMTP ADMIN REST API
  • 9. CHANNEL ADAPTER @RequestMapping(method = RequestMethod.POST) @ResponseStatus(HttpStatus.CREATED) public ProfileResource register(@Valid @RequestBody RegistrationResource registration) { Profile profile = profileService.save(regResToProfile.convert(registration)); publisher.publishEvent(new RegistrationEvent(this, profile)); return profileToProfileResource.convert(profile); } <int-event:inbound-channel-adapter channel="event-channel" event-types=“x.x.RegistrationEvent"/> <channel id="event-channel“ />
  • 10. ENRICHER <header-enricher input-channel="event-channel"> <header name="uuid“ expression="T(java.util.UUID).randomUUID.toString()"/> </header-enricher>
  • 12. PIPING IT ALL TOGETHER <int-event:inbound-channel-adapter channel="event-channel" event-types="com.levi9.samples.eip.registration.event.RegistrationEvent" /> <channel id="event-channel" /> <header-enricher input-channel="event-channel" output-channel=“logger"> <header name="uuid" expression="T(java.util.UUID).randomUUID().toString()" /> </header-enricher> <logging-channel-adapter id="logger" level="INFO" log-full-message="true" />
  • 14. SPLITTER & ROUTER <splitter input-channel="confirmation-channel“ output-channel="splitted" method="split"> <beans:bean class="com.levi9.samples.eip.registration.splitter.ProfileSplitter" /> </splitter> <payload-type-router input-channel="splitted"> <mapping type="java.lang.Long" channel="save" /> <mapping type="com.levi9.samples.eip.registration.model.Profile" channel=“email" /> </payload-type-router> public Object[] split(RegistrationEvent event) { Profile profile = event.getProfile(); return new Object[] {profile.getId(), profile}; }
  • 15. <service-activator input-channel="save" output-channel="done" expression="@profileService.pending(headers.uuid, payload)" /> <chain input-channel="email" output-channel="done"> <int-mail:header-enricher> <int-mail:from value="EIP" /> <int-mail:to expression="payload.email" /> <int-mail:subject value="Registration confirmation" /> </int-mail:header-enricher> <transformer expression="'Dear ' + payload.name + ', please click on the following link #{ environment['host.name'] }/confirm/' + headers.uuid + ' in order to confirm email address.'" /> </chain> SERVICE ACTIVATOR & TRANSLATOR public boolean pending(String uuid, Long id) { return confirmations.put(uuid, id) == null; }
  • 16. AGGREGATOR & MAIL ADAPTER public String aggregate(List<Message<?>> messages) { return (String) messages .stream() .filter(p -> p.getPayload() instanceof String) .findFirst().orElse(null).getPayload(); } <aggregator input-channel="done" method="aggregate" message-store=“store" output-channel="mail-outbound" > <bean class="com.levi9.samples.eip.registration.aggregator.ConfirmationAggregator"/> </aggregator> <channel id="mail-outbound" /> <int-mail:outbound-channel-adapter channel="mail-outbound" host="#{ environment['mail.smtp.host']}" port="#{ environment['mail.smtp.port']}" /> <bean id=“store" class="org.springframework.integration.store.SimpleMessageStore" />
  • 17. MESSAGING SYSTEM message SMTP ADMIN REST API
  • 19. RESOURCES • Book • Enterprise Integration Patterns • Gregor Hohpe, Bobby Woolf • Spring Integration • http://projects.spring.io/spring-integration • Samples • https://gitlab.levi9.com/d.gajic/eip.git • Patterns • http://www.enterpriseintegrationpatterns.com
  • 20. Q&A

Editor's Notes

  1. Information Portal Data Replication Shared Business Function SOA Distributed Business Process B2B Integration
  2. Data transport over network compared to the same on one computer requires taking into account much more things which can go wrong. This is because networks are generally unreliable and slow, which requires more complex implementations of data transport in order to achieve reliability not compromising performance. Changes: unavoidable Limited control: 3rd party or legacy Standards: XML – no semantics Maintenance: operation and maintenance (infrastructure automation)
  3. File: formats, frequency, transfer, sync issues (sharing data) DB: SQL RBDMS (standard) + ORM, schema issues (and relational model is not suitable for all use cases – NoSQL + NO encapsulation) (sharing data) RMI: encapsulation (Java RMI, WS SOAP), performance (local vs remote calls) (sharing functions) Messaging: Loose coupling: sender no longer has to depend on receiver internal data format (messages) nor its location (channels) or readiness (asynchronous + queuing)
  4. Message – data encapsulation Channel – decouples message producers from consumers Point-to-Point: only one receiver will consume particular message; channel CAN have multiple consumers Publish-Subscribe: broadcast any message to all subscribers
  5. Message – data encapsulation Channel – decouples message producers from consumers Routers – multiple outputs (location independency) Transformers: convert messages Endpoints: adapters
  6. Inbound Channel Adapter: connect an application to the messaging system so that it can send and receive messages (Spring application events in this case) Direct Channel: point to point semantics Message: payload = RegistrationEvent
  7. Content Enricher: appends data to the message – headers and/or payload (use expression to generate UUID and add to the message header)
  8. Wire Tap: publishes each incoming message to the main channel and a secondary channel (per channel or global)
  9. Inbound Channel Adapter: connect an application to the messaging system so that it can send and receive messages (Spring application events in this case) Content Enricher: appends data to the message – headers and/or payload (use expression to generate UUID and add to the message header) Wire Tap: publishes each incoming message to the main channel and a secondary channel (per channel or global)
  10. Composite processor: splits the message up, routes the sub messages to appropriate destinations and aggregates responses (harder because of the asynchronous nature).
  11. Composite processor: splits the message up, routes the sub messages to appropriate destinations and aggregates responses (harder because of the asynchronous nature).
  12. Composite processor: splits the message up, routes the sub messages to appropriate destinations and aggregates responses (harder because of the asynchronous nature).
  13. Composite processor: splits the message up, routes the sub messages to appropriate destinations and aggregates responses (harder because of the asynchronous nature).
  14. Publisher-Subscriber: multiple consumers AMQP (RabbitMQ): inbound/outbound channel adapters
  15. Publisher-Subscriber: multiple consumers AMQP (RabbitMQ): inbound/outbound channel adapters
  16. File: DB: RMI: Messaging: