Making queries on demand: MongoDB outbound gateway

1 Introduction In order to read data from MongoDb, Spring Integration comes with the MongoDb inbound channel adapter. This adapter uses a poller to continuously retrieve documents from the database. However, sometimes we may need to query the database on demand, based on the result…

Spring Integration MongoDB adapters with Java DSL

1 Introduction This post explains how to save and retrieve entities from a MongoDB database using Spring Integration. In order to accomplish that, we are going to configure inbound and outbound MongoDB channel adapters using the Java DSL configuration extension. As an example, we are…

Spring Integration – Polling file creation and modification

1 Introduction File support is another of Spring Integration’s endpoints to communicate with external systems. In this case, it provides several components to read, write and transform files. During this post, we are going to write an application which monitors a directory in order to…

Spring Integration 4.0: A complete XML-free example

1 Introduction Spring Integration 4.0 is finally here, and this release comes with very nice features. The one covered in this article is the possibility to configure an integration flow without using XML at all. Those people that don’t like XML will be able to…

Spring Integration – Configure web service client timeout

1 Introduction With the support of Spring Integration, your application can invoke a web service by using an outbound web service gateway. The invocation is handled by this gateway. Hence, you just need to worry about building the request message and handling the response. However,…

Retry web service operations with RequestHandlerRetryAdvice

1 Introduction Sometimes when invoking a web service, we may be interested in retrying the operation in case an error occurs. When using Spring Integration, we can achieve this functionality with RequestHandlerRetryAdvice class. This class will allow us to retry the operation for a specified…

How error handling works in Spring Integration

1 Introduction The target of this post is to show you how error handling works in Spring Integration, using the messaging system. You will see that error handling is different between synchronous and asynchronous messaging. As usual, I’ll skip the chat and proceed with some…

Spring Integration – Using RMI Channel Adapters

1 Introduction This article explains how to send and receive messages over RMI using Spring Integration RMI channel adapters. It is composed of the following sections: Implement the service: The first section focuses on creating and exposing a service. Implement the client: Shows how to…