Bridge
Message endpoint that connects two channels or channel adapters together. Listing 22-20 below shows declaring a bridge in the Spring configuration file.
In EAI, message bridge can be pictorially represented as shown in Figure 22-27 below.
Figure 22-27. Message Bridge
Listing 22-20. Declaring a bridge in the Spring configuration file
1 2 3 4 5 |
<stream:stdin-channel-adapter id=”stdIn”/> <stream:stdout-channel-adapter id=”stdOut”/> <bridge id=”bridge” input-channel=”stdIn” output-channel=”stdOut”/> |
Creating Custom Adapter
Spring out-of-the-box provides adapters for most common communication protocols and systems. However, Spring also allows you to write your own adapters if you require one in your application with ease. Please do not consider this as an advertisement for this book reference, but I feel referring to Chapter 15 of Book titled, “Pro Spring Integration”, published by Apress, would be the ideal way to go forward.
Spring Integration Architecture
Having understood the main components consisting Spring Integration in previous section, we can bring those components together as shown in Figure 22-28, which represents the Spring Integration architecture.
Figure 22-28. Spring Integration high-level architecture
STS Support
SpringSource Tool Suite (STS) provides several features that are especially exciting for Spring Integration users. STS 3.x.x adds support for Spring Integration 2.1, improves the visualization capabilities for Spring Integration flows, and adds support for all newly added Spring Integration adapters like Redis, Gemfire, AMQP and Stored procedure.
In addition to that, all existing Spring Integration adapters have been updated to support new visualization elements.
Templating is one of the important features of STS. Good news is that STS now comes up with templating support for Spring Integration projects as well using Spring Template Project Wizard.
Message Channel Implementations
Message Channel can be broadly classified as shown in Figure 22-29 below.
Figure 22-29. Message Channel implementation classification
Table 22-2 below shows MessageChannel implementations grouped accordingly.
Table 22-2. MessageChannel implementation classes
Type |
Implementation |
Description |
SubscribableChannel | DirectChannel | Direct point-to-point channel |
PublishSubscribeChannel | Broadcasts any message send to it to all the subscribed handlers. Publish/subscribe channel with optional TaskExecutor. Intended to send only. | |
ExecutorChannel | Point-to-point with TaskExecutor | |
PollableChannel | QueueChannel | Wraps a First-in-First-out buffering queue |
PriorityChannel | Queue channel which stores messages in priority-ordered | |
RendezvousChannel | Queue channel with zero-capacity which ensures handoff | |
NullChannel | Simply logs any message sent to it at DEBUG level and returns immediately |
Note: The Figure 22-1 is not a class diagram depicting various class/interface dependencies. It only shows the classification of message channel according to its implementation. Covering these channels in more detail is not in scope of this book.
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