-
Making queries on demand: MongoDB outbound gateway
Integration, mongoDB, Spring, Spring-Boot ·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 of another endpoint.
Taking advantage of Spring’s extensibility, I implemented a MongoDb outbound gateway. The purpose of...
-
Spring Integration MongoDB adapters with Java DSL
Integration, mongoDB, Spring, Spring-Boot ·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 going to build an application to allow you to write orders to a MongoDB store, and then...
-
Spring Integration – Polling file creation and modification
Integration, Spring, Spring-Boot ·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 read all files in there. In concrete it does the following:
- When the application starts, it...
-
Data Aggregation Spring Data MongoDB: Nested results
mongoDB, Spring ·In a previous post, we built a basic example of an aggregation pipeline. Maybe you want to take a look at Data aggregation with Spring Data MongoDB and Spring Boot if you need more detail about how to create the project and configure the application. In this post, we will focus on learning a use case where it makes...
-
Data aggregation with Spring Data MongoDB and Spring Boot
mongoDB, Spring, Spring-Boot, Spring-Data ·MongoDB aggregation framework is designed for grouping documents and transforming them into an aggregated result. The aggregation query consists in defining several stages that will be executed in a pipeline. If you are interested in more in-depth details about the framework, then mongodb docs are a good point to start.
The point of this post is to...