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
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
1 2 3 4 5 6 7 8 9 10 11 |
public class SampleAggregatorClass{ public HugeClass aggregatorMethod(List list){ HugeClass hugeObject = new HugeClass(); return hugeObject; } } |
1 2 3 |
<bean id=”sampleAggregator” class=”com.mybook.sample.aggregator.SampleAggregatorClass”/> <splitter ref=”sampleAggregator” …/> |
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
Listing 22-18 shows declaring a messaging resequencer in the Spring configuration file.
Listing 22-18. Resequencer declaration in Spring configuration file
1 2 3 4 5 6 7 8 9 |
… <int:channel id="inChannel"/> <int:resequencer input-channel="inChannel" output-channel="outChannel"/> <int:channel id="outChannel"/> … |
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
Listing 22-19 shows declaration of message transformer in the Spring configuration file.
Listing 22-19. Message transformer declaration in Spring configuration file
1 2 3 4 5 6 7 |
<transformer input-channel=”inChannel” output-channel=”outChannel” ref=”anyPOJO” method=”methodToTransform”/> |
Page Visitors: 13052


Tomcy John


Latest posts by Tomcy John (see all)
- A Guide to Continuous Improvement for Architects - February 2, 2023
- Cloud-first Architecture Strategy - January 26, 2023
- Architecture Strategy and how to create One - January 24, 2023
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!
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