CAMEL-23581: camel-elasticsearch + camel-opensearch - align Exchange header constant names with Camel naming convention#23442
Merged
Conversation
davsclaus
approved these changes
May 21, 2026
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Contributor
|
🧪 CI tested the following changed modules:
All tested modules (11 modules)
|
gnodet
approved these changes
May 22, 2026
Contributor
gnodet
left a comment
There was a problem hiding this comment.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames the Exchange header string values in
ElasticsearchConstantsandOpensearchConstantsfrom non-Camel prefixed values (operation,indexId,indexName,documentClass,waitForActiveShards,scrollKeepAliveMs,useScroll,size,from,enableDocumentOnlyMode) toCamelElasticsearch*/CamelOpensearch*, following the conventionused 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 constantssymbolically continue to work; routes using the literal string values
must be updated (documented in the 4.21 upgrade guide).
Notes
Camel-prefixedPROPERTY_SCROLL_ES_QUERY_COUNTandPROPERTY_SCROLL_OPENSEARCH_QUERY_COUNTconstants are unchanged.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 mirrorcomponents/camel-opensearch/.../opensearch.json+ catalog mirrordsl/camel-endpointdsl/.../ElasticsearchEndpointBuilderFactory.java(
operation()→elasticsearchOperation(), etc.)dsl/camel-endpointdsl/.../OpensearchEndpointBuilderFactory.java(
operation()→opensearchOperation(), etc.)Backports
Both components exist on
camel-4.18.xandcamel-4.14.xwith the sameconstant values. Backports will be filed as follow-up PRs once this lands.
Test plan
mvn testincomponents/camel-elasticsearch— passes (unit testshave no body; the integration tests live in
*IT.javafiles andrequire a running cluster)
mvn testincomponents/camel-opensearch— passesartifacts in
git statuselasticsearch<Name>()/opensearch<Name>()convention=== camel-elasticsearch / camel-opensearchTracker: CAMEL-23577
Reported by Claude Code on behalf of Andrea Cosentino