You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project is based mostly on the community-driver-feedback. So, if there is no demand for Elasticsearch, then there is no support in the project. But it doesn't mean that we won't add it in the future if community (you) asks for it.
We also are very open for Contribution becuase we may be busy with some other priorities, like fixing and improving already existing features.
I saw recently that our new Stream Applications project - Serverless Functions for Spring Integration components and similar - has gotten a contribution for Elasticsearch Consumer. So, that could be as a great starting point how to implement respective channel adapter in Spring Integration.
The project is based mostly on the community-driver-feedback. So, if there is no demand for Elasticsearch, then there is no support for the project.
@artembilan But there is. And so for all of the other requested channel adapters. This project for some reason doesn't add support for the most common and standard databases and technologies in the industry, even though it is being developed for years. I don't expect special functionalities or something. Just bulk-based channel adapters for most of the databases (addition of a channel adapter won't take more than 1-2 days for a developer who knows this library well).
We are just short-handed over here in our team for the project.
Plus I'm not familiar with Elasticsearch to jump into an implementation immediately.
Therefore I'm asking for a contribution which I'll gladly review quickly and so on.
@artembilan I understand and I’ll try to find the right time for contribution of some channel adapters. Anyway, writing to ES with Spring is super easy. Basic familiarity with the ReactiveElasticsearchClient should be enough.
there is just not Elasticsearch support in this project yet, therefore no docs on the matter.
This issue is exactly about implementing those and document them properly.
Hi @artembilan, I'd like to take this on, following your invitation above. Before writing it, here is the scope I have in mind, modelled on the Cassandra module:
A new spring-integration-elasticsearch module built on Spring Data Elasticsearch, so it reuses ElasticsearchOperations and ReactiveElasticsearchOperations, the entity mapping and Spring Boot's client auto-configuration.
An ElasticsearchMessageHandler for an outbound channel adapter or gateway, with an INDEX mode (save the payload, or a collection of payloads as one bulk request), a DELETE mode (by entity or id) and a SEARCH mode (a Query built from the message by an expression or a function, replying with the hits). The reactive variant would extend AbstractReactiveMessageHandler, like the reactive Cassandra handler.
An Elasticsearch Java DSL factory, and no XML namespace, like the recent modules.
Tests against an Elasticsearch Testcontainers container, reference docs and a "What's New" entry.
An inbound polling MessageSource for a query could come in a second step, if you think it is worth it.
Since 7.2.0-RC1 is close, I assume this would target 7.3. Does this scope work for you, or would you rather start smaller, with the outbound side only?
I don't see a reason to have a blocking channel adapter if that simply could be achieved with Mono.block() from the reactive message handler implementation.
I think first PR is fully enough to have just an ElasticsearchMessageHandler (has to be reactive).
Java DSL could be next step.
Then inbound channel adapter as an evolution. Although, you are right, I'm not familiar with Elasticsearch to judge what is exactly a MessageSource with that store.
Spring Boot support is out of this project scope. However I think you just meant to have respective Spring Data operations injected into our channel adapter. But then again: it doesn't matter already how that one configured in the application.
Thank you, @artembilan, that's clear. I'll start with just a reactive ElasticsearchMessageHandler on top of ReactiveElasticsearchOperations, using the spring-elasticsearch-consumer of the functions catalog as a starting point, and follow up with the Java DSL and then the inbound side. I'll aim it at the next version.
Opened #11540 with the first step: the spring-integration-elasticsearch module and the reactive ElasticsearchMessageHandler for INDEX and DELETE, tested against an Elasticsearch 9.5 container. The PR description has the details and the open questions.
Activity
artembilan commentedon Mar 25, 2021
The project is based mostly on the community-driver-feedback. So, if there is no demand for Elasticsearch, then there is no support in the project. But it doesn't mean that we won't add it in the future if community (you) asks for it.
We also are very open for Contribution becuase we may be busy with some other priorities, like fixing and improving already existing features.
If you already have some ideas how it can be incorporated into a project, we are very likely to accept a PR for the current
5.5version or the next one. Or we can extract it into a extension project like we have so far for Apache Cassandra and Hazelcast: https://github.com/spring-projects/spring-integration-extensions.I saw recently that our new Stream Applications project - Serverless Functions for Spring Integration components and similar - has gotten a contribution for Elasticsearch Consumer. So, that could be as a great starting point how to implement respective channel adapter in Spring Integration.
[-]elasticsearch support[/-][+]Add Elasticsearch support[/+]migroskub commentedon May 11, 2022
@artembilan But there is. And so for all of the other requested channel adapters. This project for some reason doesn't add support for the most common and standard databases and technologies in the industry, even though it is being developed for years. I don't expect special functionalities or something. Just bulk-based channel adapters for most of the databases (addition of a channel adapter won't take more than 1-2 days for a developer who knows this library well).
artembilan commentedon May 11, 2022
Sure, @migroskub !
We are just short-handed over here in our team for the project.
Plus I'm not familiar with Elasticsearch to jump into an implementation immediately.
Therefore I'm asking for a contribution which I'll gladly review quickly and so on.
Thanks for understanding!
migroskub commentedon Jun 3, 2022
@artembilan I understand and I’ll try to find the right time for contribution of some channel adapters. Anyway, writing to ES with Spring is super easy. Basic familiarity with the
ReactiveElasticsearchClientshould be enough.rolkhas2 commentedon Jul 16, 2022
I don't understand why doesn't this channel adapter documented here. I'm struggling with finding a way of using it.
artembilan commentedon Jul 16, 2022
@rolkhas2 ,
there is just not Elasticsearch support in this project yet, therefore no docs on the matter.
This issue is exactly about implementing those and document them properly.
sharanggupta commentedon Oct 15, 2026
Hi @artembilan, I'd like to take this on, following your invitation above. Before writing it, here is the scope I have in mind, modelled on the Cassandra module:
spring-integration-elasticsearchmodule built on Spring Data Elasticsearch, so it reusesElasticsearchOperationsandReactiveElasticsearchOperations, the entity mapping and Spring Boot's client auto-configuration.ElasticsearchMessageHandlerfor an outbound channel adapter or gateway, with anINDEXmode (save the payload, or a collection of payloads as one bulk request), aDELETEmode (by entity or id) and aSEARCHmode (aQuerybuilt from the message by an expression or a function, replying with the hits). The reactive variant would extendAbstractReactiveMessageHandler, like the reactive Cassandra handler.ElasticsearchJava DSL factory, and no XML namespace, like the recent modules.An inbound polling
MessageSourcefor a query could come in a second step, if you think it is worth it.Since 7.2.0-RC1 is close, I assume this would target 7.3. Does this scope work for you, or would you rather start smaller, with the outbound side only?
artembilan commentedon Oct 15, 2026
Hey, @sharanggupta !
Thank you for looking into this!
All ideas are good.
Couple small remarks:
Mono.block()from the reactive message handler implementation.ElasticsearchMessageHandler(has to be reactive).MessageSourcewith that store.operationsinjected into our channel adapter. But then again: it doesn't matter already how that one configured in the application.MessageHandlerwhich might be a good start for your effort: https://github.com/spring-cloud/spring-functions-catalog/tree/main/consumer/spring-elasticsearch-consumersharanggupta commentedon Oct 15, 2026
Thank you, @artembilan, that's clear. I'll start with just a reactive
ElasticsearchMessageHandleron top ofReactiveElasticsearchOperations, using thespring-elasticsearch-consumerof the functions catalog as a starting point, and follow up with the Java DSL and then the inbound side. I'll aim it at the next version.sharanggupta commentedon Oct 15, 2026
Opened #11540 with the first step: the
spring-integration-elasticsearchmodule and the reactiveElasticsearchMessageHandlerforINDEXandDELETE, tested against an Elasticsearch 9.5 container. The PR description has the details and the open questions.