Skip to content

CAMEL-23581: camel-elasticsearch + camel-opensearch - align Exchange header constant names with Camel naming convention#23442

Merged
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23581
May 22, 2026
Merged

CAMEL-23581: camel-elasticsearch + camel-opensearch - align Exchange header constant names with Camel naming convention#23442
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23581

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 21, 2026

Summary

Renames the Exchange header string values in ElasticsearchConstants and
OpensearchConstants from non-Camel prefixed values (operation, indexId,
indexName, documentClass, waitForActiveShards, scrollKeepAliveMs,
useScroll, size, from, enableDocumentOnlyMode) to
CamelElasticsearch* / CamelOpensearch*, following the convention
used across the rest of the Camel component catalog and matching the
pattern established in CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail),
CAMEL-23461 (camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket /
camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira).

The Java field names (PARAM_OPERATION, PARAM_INDEX_ID, PARAM_INDEX_NAME,
PARAM_DOCUMENT_CLASS, PARAM_WAIT_FOR_ACTIVE_SHARDS,
PARAM_SCROLL_KEEP_ALIVE_MS, PARAM_SCROLL, PARAM_SIZE, PARAM_FROM,
PARAM_DOCUMENT_MODE) are unchanged so routes referencing the constants
symbolically continue to work; routes using the literal string values
must be updated (documented in the 4.21 upgrade guide).

Notes

  • The already-Camel-prefixed PROPERTY_SCROLL_ES_QUERY_COUNT and
    PROPERTY_SCROLL_OPENSEARCH_QUERY_COUNT constants are unchanged.
  • The two components are paired in this single PR because they share an
    identical header surface (originally one was forked from the other) and
    the upgrade-guide entry covers them together.

Generated artifacts

  • components/camel-elasticsearch/.../elasticsearch.json + catalog mirror
  • components/camel-opensearch/.../opensearch.json + catalog mirror
  • dsl/camel-endpointdsl/.../ElasticsearchEndpointBuilderFactory.java
    (operation()elasticsearchOperation(), etc.)
  • dsl/camel-endpointdsl/.../OpensearchEndpointBuilderFactory.java
    (operation()opensearchOperation(), etc.)

Backports

Both components exist on camel-4.18.x and camel-4.14.x with the same
constant values. Backports will be filed as follow-up PRs once this lands.

Test plan

  • mvn test in components/camel-elasticsearch — passes (unit tests
    have no body; the integration tests live in *IT.java files and
    require a running cluster)
  • mvn test in components/camel-opensearch — passes
  • Module + catalog + endpointdsl built cleanly; only es/os regen
    artifacts in git status
  • DSL accessor names verified to follow elasticsearch<Name>() /
    opensearch<Name>() convention
  • Upgrade guide entry added under === camel-elasticsearch / camel-opensearch

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

@oscerd oscerd requested review from davsclaus and gnodet May 21, 2026 18:20
@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-elasticsearch
  • components/camel-opensearch
  • docs
  • dsl/camel-endpointdsl
All tested modules (11 modules)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: ElasticSearch Java API Client
  • Camel :: Endpoint DSL
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: OpenSearch Java API Client
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

Copy link
Copy Markdown
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good — all header values correctly renamed to CamelElasticsearch* / CamelOpensearch* PascalCase convention. Constants mirror correctly between the two components. Upgrade guide is thorough. Tests use symbolic constants so they're unaffected.

Claude Code on behalf of Guillaume Nodet

…header constant names with Camel naming convention

Renames the Exchange header string values in ElasticsearchConstants and
OpensearchConstants from non-Camel prefixed values (operation, indexId,
indexName, documentClass, waitForActiveShards, scrollKeepAliveMs,
useScroll, size, from, enableDocumentOnlyMode) to CamelElasticsearch* /
CamelOpensearch*, following the convention used across the rest of the
Camel component catalog and matching the pattern established in
CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail), CAMEL-23461
(camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket /
camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira).

The Java field names (PARAM_OPERATION, PARAM_INDEX_ID, PARAM_INDEX_NAME,
PARAM_DOCUMENT_CLASS, PARAM_WAIT_FOR_ACTIVE_SHARDS,
PARAM_SCROLL_KEEP_ALIVE_MS, PARAM_SCROLL, PARAM_SIZE, PARAM_FROM,
PARAM_DOCUMENT_MODE) are unchanged so routes referencing the constants
symbolically continue to work; routes using the literal string values
must be updated (documented in the 4.21 upgrade guide).

The already-Camel-prefixed PROPERTY_SCROLL_ES_QUERY_COUNT and
PROPERTY_SCROLL_OPENSEARCH_QUERY_COUNT constants are unchanged.

The generated Endpoint DSL header accessors on
ElasticsearchHeaderNameBuilder and OpensearchHeaderNameBuilder have been
renamed accordingly (operation() -> elasticsearchOperation() /
opensearchOperation(), indexId() -> elasticsearchIndexId() /
opensearchIndexId(), etc.).

All existing tests use symbolic constant references and continue to pass
without changes.

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd force-pushed the fix/CAMEL-23581 branch from f772d54 to 5ad7980 Compare May 22, 2026 16:33
@oscerd oscerd merged commit 70d9e92 into apache:main May 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants