Friday, April 19, 2019

Spring Integrations

Goals and Principles of Spring Integrations:


Spring Integration is motivated by the following goals:

• Provide a simple model for implementing complex enterprise integration solutions.
• Facilitate asynchronous, message-driven behavior within a Spring-based application.
• Promote intuitive, incremental adoption for existing Spring users.

Spring Integration is guided by the following principles:


  1. Components should be loosely coupled for modularity and testability.
  2. The framework should enforce separation of concerns between business logic and integration logic.
  3. Extension points should be abstract in nature but within well-defined boundaries to promote reuse and portability.


Main  Components

Message


Message Channel

Message End Point

Message Endpoints

Transformer
Filter
Router
Splitter
Aggregator
Service Activator
Channel Adapter


Configuration and @EnableIntegration

Reference -  http://www.einnovator.org/document/36
  • Adaptors --- perform one-way communication between an external data protocol and the integration network. Depending on the direction of the data flow, two sub-cases are considered.
       Adapters  connect your channel to some other system

    • Inbound Adaptors --- bring data from an external system to the integration network
      • sending messages to pipe/wire will be handled by Inbound adapters.
    • Outbound Adaptors --- move data produced and/or processed by the integration network to bring an external system
      • The receiving side of the pipe is activated via an Outbound adapter or a Service-Activator.

  • Gateways --- perform two-way communication between an external data protocol and the integration network. Similarly to the one-way adaptor two sub-cases are considered, depending of whether the integration network or the exteranl system is the orginal source of the data for the processing route:
    • Inbound Gateways --- bring data from an external system to the integration network, and expect a response message to be provided by some other components, through some channel, to be forward to the external system
    • Outbound Gateways --- send data to an external system (produced by some other component), and expect the external system to send some response data back. The response data is them droped in some channel to be further processed by other components
Some examples of adaptors for specific protocols include:
  • JmsOutBoundAdapter --- reads messages from an input channel and sends JMS messages to a JMS destination. The payload of the JMS message is converted from the payload of the internal message. Some headers of the JMS are also initialized (e.g. priority) are also initialized form the header of the internal message
  • JmsInBoundAdapter --- reads messages from a JMS destination, and drops them in an output channel for further processing.
  • HttpInboundGateway --- accepts HTTP request, creates a message from that content, drops it in an output channel, and waits for a response message to be produced. When the response message is received, the HTTP response is created and written to the HTTP connection output stream. The body of the HTTP request and HTTP response are mapped to/from the payload according to the MIME type defined in the HTTP header Content-Type. HTTP headers of the response can be set headers in the internal message with ``well-know'' names.
Table below summarizes the taxonomy of external adaptors as modeled in Spring Integration.
Table below summarizes the taxonomy of external adaptors as modeled in Spring Integration.
InboundOutbound
One-WayInbound adaptorOutbound adaptor
Two-WayInbound GatewayOutbound Gateway







No comments:

Post a Comment

Hyderabad Trip - Best Places to visit

 Best Places to Visit  in Hyderabad 1.        1. Golconda Fort Maps Link :   https://www.google.com/maps/dir/Aparna+Serene+Park,+Masj...