Skip to content

Add Elasticsearch support #3527

Open

Description

@JianboDM

Does this project support elasticsearch?if not,Do you plan to support elasticsearch?

Activity

  1. added
    status: waiting-for-triage
    on Mar 25, 2021
  2. artembilan commented on Mar 25, 2021

    @artembilan
    Member

    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.5 version 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.

  3. added this to the Backlog milestone on Mar 25, 2021
  4. changed the title [-]elasticsearch support[/-] [+]Add Elasticsearch support[/+] on Mar 25, 2021
  5. migroskub commented on May 11, 2022

    @migroskub
    Contributor

    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).

  6. artembilan commented on May 11, 2022

    @artembilan
    Member

    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!

  7. migroskub commented on Jun 3, 2022

    @migroskub
    Contributor

    @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.

  8. rolkhas2 commented on Jul 16, 2022

    @rolkhas2

    I don't understand why doesn't this channel adapter documented here. I'm struggling with finding a way of using it.

  9. artembilan commented on Jul 16, 2022

    @artembilan
    Member

    @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.

  10. sharanggupta commented on Oct 15, 2026

    @sharanggupta
    Contributor

    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?

  11. artembilan commented on Oct 15, 2026

    @artembilan
    Member

    Hey, @sharanggupta !

    Thank you for looking into this!

    All ideas are good.
    Couple small remarks:

    1. 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.
    2. I think first PR is fully enough to have just an ElasticsearchMessageHandler (has to be reactive).
    3. Java DSL could be next step.
    4. 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.
    5. 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.
    6. We do have some specific custom implementation for such a MessageHandler which might be a good start for your effort: https://github.com/spring-cloud/spring-functions-catalog/tree/main/consumer/spring-elasticsearch-consumer
    7. Yes, the next Spring Integration is out of question for this work to be accepted. So, you got as like two month until we can merged it.
  12. sharanggupta commented on Oct 15, 2026

    @sharanggupta
    Contributor

    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.

  13. sharanggupta commented on Oct 15, 2026

    @sharanggupta
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: waiting-for-triagetype: enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions