Skip to content

Long-term strategy for scalable history/audit data storage (OpenSearch/Elasticsearch) #3282

Description

@kren-prog

Problem

Operaton's history data (ACT_HI_* tables) grows unbounded with process volume — every process instance, activity, task, and variable update is written to the relational store. For deployments running a meaningful number of processes over months/years, this becomes a real operational concern: history tables become the largest and slowest-growing part of the schema, indexing/query performance degrades, and the relational store isn't well-suited for the kind of full-text search, aggregation, and dashboarding that audit/analytics use cases usually want.

Camunda 8 addressed this in Zeebe by making the engine event-sourced and exporting to Elasticsearch/OpenSearch natively via the exporter SPI. Operaton, as a classic JDBC-based engine, doesn't have an equivalent — Postgres/MySQL/etc. remain the only supported destination for history data, and there's no first-party path to a document store better suited for large-scale search/analytics.

What exists today

The extension point that comes closest is HistoryEventHandler / ProcessEnginePlugin, which lets you register additional handlers alongside the default DbHistoryEventHandler via CompositeHistoryEventHandler. This is a viable path to build a custom OpenSearch/Elasticsearch sink, but:

  • These interfaces live under org.operaton.bpm.engine.impl.* packages, so it's unclear how stable they're meant to be treated across versions.
  • The one prior-art community project that did this, camunda-bpm-elasticsearch, has been archived since 2021 and targets Camunda 7.2.0 / Elasticsearch 1.3.1 — it's a useful reference for the architecture (implementing the HistoryEventHandler SPI, a Cockpit plugin for search), but it isn't usable as-is with current Operaton or modern OpenSearch/Elasticsearch versions.

Questions for the maintainers/community

  1. Is there any roadmap interest in a maintained, official (or community-hub) OpenSearch/Elasticsearch history exporter, given the gap left by camunda-bpm-elasticsearch going unmaintained?
  2. Would the team consider promoting HistoryEventHandler/ProcessEnginePlugin (or a purpose-built subset of it) to a supported public API, given it's the de facto extension point for this kind of use case?
  3. Has large-scale history data retention/archival/storage come up in other discussions or issues that I should be aware of? (I searched and didn't find any existing issues/discussions on this specifically.)

We're currently evaluating two approaches on our end — an in-process HistoryEventHandler plugin (same pattern as operaton-keycloak) vs. an external service polling the History REST API — and would consider contributing back whichever we land on as a community extension if there's interest.

Additional context

This problem was initially raised as a discussion here.

Activity

  1. added theissue type on Jul 3, 2026
  2. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    Hey @kren-prog! 🎉

    Thanks for opening your first issue. We really appreciate your interest and contribution. 🙌

    👉 Before moving forward, please make sure to check out our Contributing Guidelines and the Code of Conduct. This helps us keep everything clear and consistent.

    If you enjoy this project, consider giving it a star ⭐️ — we’d really appreciate that.

    Looking forward to your input! 🚀

  3. kthoms commented on Jul 11, 2026

    @kthoms
    Contributor

    Hey @kren-prog! Thank you for bringing this up. I understand that this is a valid concern.

    At current day, we have not enough resources to build and maintain such a plugin in the Operaton project. With growing adoption and companies willing to fund the project, this will change mid-term. If such a plugin, like any other feature, is chosen to be taken under the project's umbrella, we have to be sure that its maintenance and quality fits to the high standards of the project. We will include into the project scope what has secured development resources and benefits for the whole project and its users.

    I would consider making the mentioned interfaces public API. It will be safe to use the impl package versions for a while. Even if the given interfaces will go public, the won't be removed from the impl package without a deprecation period. Likely the impl-interfaces would derive from the public ones and methods moved to the public ones. I will take this into discussion.

    For the time being, users having large data amounts might consider external solutions, like using Change Data Capture to move historic data to external data storages and set up clean jobs to purge older historic data.

  4. kthoms commented on Oct 1, 2026

    @kthoms
    Contributor

    We are planning to add an API allowing the history be stored in external storage likely for 2.3 as opt-in feature. This will be added along with an implementation of the outbox pattern. It will be considered to use Elastic maybe as an alternative storage.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions