[backport camel-4.14.x] CAMEL-23581: camel-elasticsearch + camel-opensearch - align Exchange header constant names with Camel naming convention#23571
Open
oscerd wants to merge 1 commit into
Conversation
davsclaus
approved these changes
May 27, 2026
952925f to
afd88fa
Compare
…header constant names with Camel naming convention (apache#23442) 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>
afd88fa to
00c1286
Compare
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.
Backports #23442 to
camel-4.14.x. Standard 4_21 → 4_14 guide-file adaptation.PARAM_*header values renamed toCamelElasticsearch*/CamelOpensearch*prefixes.One conflict-resolution note: on 4.14.x the
PARAM_SCROLLconstant's@Metadatadescription is the simpler one-line"Set to true to enable scroll usage"; on main it was expanded to mentionOpensearchScrollRequestIteratorand resource leaks. The 4.14.x backport keeps the original 4.14.x description to avoid touching unrelated copy on the maintenance branch — only the value is renamed.mvn testpasses for both camel-elasticsearch and camel-opensearch on 4.14.x.Tracker: CAMEL-23577
Reported by Claude Code on behalf of Andrea Cosentino