While Spring Security is wickedly powerful and essential for securing Java applications, there’s another Spring project that is equally deserving of praise and admiration: Spring Integration.
Spring Integration is a lightweight framework that allows developers to build complex, scalable, and extensible systems by connecting components using a messaging paradigm.
If you’re wondering why this little ole’ toolkit originally built by still-active Spring veteran Mark Fisher has grown to such huge popularity, then hang on.
1 — Messaging Paradigm with POJOs
One of the most coolest aspects of Spring Integration is its messaging paradigm, which enables developers to connect components without having to implement any framework-specific code.
No RPC. No JMS calls. No REST calls. (Well, unless you’re aching for it!)
By allowing you to work with POJOs (Plain Old Java Objects), Spring Integration simplifies the process of building and maintaining your application’s architecture.
It must be pointed out that while you CAN use POJOs all over the place, it’s ALSO possible to use Spring tech-neutral Message type.
If you dig into just about any messaging solution (HTTP, AMQP, etc.) you’ll find they ALL have this paradigm of headers and a payload.
And Spring Integration codifies this as a barebones interface:
This generic container provides the means to capture both information about the task at end along with metadata to support routing, processing, TTL, and other aspects. In fact, you can do just about ANYTHING with this.
And something to be aware of, is that several OTHER portfolio projects. For example, if you dig into the guts of Spring Cloud Stream, you’ll discover that it harnesses the core concept of Spring Integration messaging, and dials it up to an 11.
Let go of your concept of synchronous remote calls and instead start thinking of bundling up information into…