Spring Book – Chapter 20 – Spring Integration

Aggregator

Multiple messages as taken as input and the aggregator endpoint joins together and sends a single message as output.

In EAI, message aggregator can be pictorially represented as shown in Figure 22-24 below.

Figure 22-24. Aggregator

Figure 22-24. Aggregator

Similar to splitter, aggregating strategy should be specifically provided as dedicated method as shown in the Listing 22-17 below.

Listing 22-17. Splitter method in Java and corresponding Spring configuration

Resequencer

This is an endpoint, which has the ability of ordering the incoming messages. It actually consumes many correlated messages and reassigns the order in which they are delivered. The resequencer works on the SEQUENCE_NUMBER header field which makes it possible to track the sequences.

In EAI, message resequencer can be pictorially represented as shown in Figure 22-25 below.

Figure 22-25. Resequencer

Figure 22-25. Resequencer

Listing 22-18 shows declaring a messaging resequencer in the Spring configuration file.

Listing 22-18. Resequencer declaration in Spring configuration file

Transformer

Endpoint entrusted with transforming message to other formats as required by your application. Since messages are immutable in nature, transformer always creates new message after transformation.

In EAI, message transformer can be pictorially represented as shown in Figure 22-26 below.

Figure 22-26. Message Transformer

Figure 22-26. Message Transformer

Listing 22-19 shows declaration of message transformer in the Spring configuration file.

Listing 22-19. Message transformer declaration in Spring configuration file

Page Visitors: 10803

The following two tabs change content below.
Tomcy John

Tomcy John

Blogger & Author at javacodebook
He is an Enterprise Java Specialist holding a degree in Engineering (B-Tech) with over 10 years of experience in several industries. He's currently working as Principal Architect at Emirates Group IT since 2005. Prior to this he has worked with Oracle Corporation and Ernst & Young. His main specialization is on various web technologies and acts as chief mentor and Architect to facilitate incorporating Spring as Corporate Standard in the organization.
Tomcy John

Latest posts by Tomcy John (see all)

2 thoughts on “Spring Book – Chapter 20 – Spring Integration

  1. Hi,
    Thanks for this blog and information sharing!
    I have one question from Spring Integration. Just thought of checking with you.
    I have SimplewebserviceOutBoundGateway. I need to send a document / attachment to the webservice. How will i achieve that?
    This is my current gateway configuration:

    Please let me know, if you can throw some light in this area.
    Thanks in Advance!

  2. Hi,
    Thank you for your information sharing.
    I have one doubt,could you please suggest me the correct frameworks to address that issue.

    My requirement is I would like to get and process files using spring and camel.

    Thanks,
    Madhu

Leave a Reply

Your email address will not be published. Required fields are marked *