Spring Integration Tutorials

Spring Integration Tutorials

In this detailed Resource page, we feature an abundance of Spring Integration Tutorials!

Spring Integration is an open source framework for enterprise application integration. It is a lightweight framework that builds upon the core Spring framework. It is designed to enable the development of integration solutions typical of event-driven architectures and messaging-centric architectures.

Spring Integration extends the Spring programming model to support the well-known Enterprise Integration Patterns. Enables lightweight messaging within Spring-based applications and supports integration with external systems via declarative adapters. Those adapters provide a higher-level of abstraction over Spring’s support for remoting, messaging, and scheduling.

Using the Spring Framework encourages developers to code using interfaces and use dependency injection (DI) to provide a Plain Old Java Object (POJO) with the dependencies it needs to perform its tasks. Spring Integration takes this concept one step further, where POJOs are wired together using a messaging paradigm and individual components may not be aware of other components in the application. Such an application is built by assembling fine-grained reusable components to form a higher level of functionality. With careful design, these flows can be modularized and also reused at an even higher level.

In addition to wiring together fine-grained components, Spring Integration provides a wide selection of channel adapters and gateways to communicate with external systems. Channel Adapters are used for one-way integration (send or receive); gateways are used for request/reply scenarios (inbound or outbound). For a full list of adapters and gateways, refer to the reference documentation.

The Spring Cloud Stream project builds on Spring Integration, where Spring Integration is used as an engine for message-driven microservices.

If you wish to build up your Spring Integration knowledge first, check out our Spring Integration Tutorial for EAI.

Spring Integration Tutorials – Getting Started

Simple examples on Spring Integration fundamentals and how to use its components so that you can develop your own applications

  • Introduction to Enterprise Application Integration
    This part introduces you to what enterprise integration patterns are and how different strategies can be applied to design integration solutions. The reason behind why you should acquire a basic knowledge of these patterns in this course is because the Spring Integration project was designed upon these patterns.
  • Spring Integration Fundamentals
    You will learn the basic concepts that form the core of Spring Integration, how different types of communication (asynchronous and synchronous) are supported by Spring Integration, and how this decision can affect your design.
  • Spring Integration Adapter Example
    Adapter is the most important component for enterprise application integration. Adapter acts as a bridge between the integration framework and the external components.
  • Spring Integration Aggregator Example
    In this article we will be discussing about a useful Spring Integration component called Aggregator. Enterprise applications with large datasets may need to process lot of information and sending an entire dataset to one location for processing, would be inefficient. Thus we need to partition data by splitting into smaller pieces. This is achieved by a Spring Integration component called Splitter.
  • Spring Integration Splitter Example
    Spring Integration provides many components for processing messages before they reach their end point. Splitter is the component that breaks down a message into multiple messages based on specific criteria. The benefit is that after splitting, the system can apply separate business logic on each part.
  • Spring Integration Database Polling Example
    Spring Integration provides JDBC channel adapters that connect a channel to a database. In the case of the inbound adapter, a database is the source on which an SQL query can be run and the complete result set is available as a message with a Java List payload.
  • Spring Integration Control Bus Example
    Control bus is a useful Spring Integration component that accepts messages on the input channel similar to Service Activator, Adapter or Transformer but the key difference is that the payload of the message that is received indicates an invocable action or operation on a bean.
  • Spring Integration Full Example
    This tutorial will go through a complete example of an application that uses several of the components provided by Spring Integration in order to provide a service to its users. This service consists of a system prompting the user to choose among different theaters. After his selection, the system will make a request to the external system of the chosen theater and return the list of its available films.

Spring Integration Tutorials – Web Services

Learn integration with external web services

  • Spring Integration and Web Services
    In this tutorial you are going to see the first example of an application enhanced with Spring Integration. In order to accomplish it, this example will focus on the integration with external web services.
  • Spring Integration Kafka Tutorial
    Spring for Apache Kafka is a project that applies Spring concepts like dependency injection, annotations and listener containers to help develop messaging systems using Apache Kafka. Leveraging this project, the Spring Integration Kafka module provides two components: Outbound Channel Adapter and Message Driven Channel Adapter.
  • Spring Hibernate Integration Example – Mysql and Maven Showcase
    In this tutorial we shall show you how to create a simple Spring Hibernate MySql example. The Spring Framework supports integration with Hibernate for resource management, data access object (DAO) implementations and transaction strategies.

Spring Integration Tutorials – Messaging

Integrate your application with messaging

  • Enterprise Messaging
    This tutorial is focused on explaining how we can integrate our application with Spring Integration and JMS messaging. For this purpose, I will first show you how to install Active MQ, which will be our broker during this tutorial. Next sections will show examples of sending and receiving JMS messages by using the Spring Integration JMS channel adapters.
  • Spring Boot Integration ActiveMQ Example
    In this article we will be discussing the integration of Spring Boot with ActiveMQ. We will be using ActiveMQ as a message broker and create a sample application with JMS Queue and channel adapters integrated with Spring Boot to implement asynchronous messaging service.
  • Spring Integration Http Gateway Example
    In Spring Integration, the Messaging Gateway pattern is implemented in the gateway component, which is used to provide an entry / exit system between the application and an external system.
  • Spring Integration FTP Gateway Example
    Spring Integration provides gateways and adapters as a means to connect to external endpoints. In many real-life integration scenarios, data is received from other systems as files sent to a FTP server. Spring Integration provides FTP inbound and outbound channel adapters as well as gateways to interact with a FTP server.
  • Spring Integration Custom Transformer Example
    Spring Integration provides a transformer mechanism to convert message payloads from one form to another between two channels. In this article, we will see how to implement a simple custom transformer.
  • Spring Integration DirectChannel Example
    This article discusses the implementation of Spring Integration Direct Channel in a Spring Boot application. Spring Integration supports Enterprise Integration patterns, of which the message channel pattern decouples the producer and consumer endpoints and is agnostic to the message payload.
  • Spring Integration Chain Example
    Spring Integration provides a way to group set of elements into one transaction and its referred as chaining. In this post we will look at MessageHandlerChain that is an implementation of MessageHandler and it can be configured as a single message endpoint while actually delegating to a chain of handlers like Filters,Transformers etc.
  • Monitoring and Management
    After having experimented with the main components provided by Spring Integration and seen how it integrates well with other systems like JMS queues or web services, this chapter finishes the course by showing different mechanisms of monitoring or gathering more information about what is going on within the messaging system.


Back to top button