Skip to content

[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
apache:camel-4.14.xfrom
oscerd:backport/23442-to-camel-4.14.x
Open

[backport camel-4.14.x] CAMEL-23581: camel-elasticsearch + camel-opensearch - align Exchange header constant names with Camel naming convention#23571
oscerd wants to merge 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23442-to-camel-4.14.x

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 27, 2026

Backports #23442 to camel-4.14.x. Standard 4_21 → 4_14 guide-file adaptation. PARAM_* header values renamed to CamelElasticsearch* / CamelOpensearch* prefixes.

One conflict-resolution note: on 4.14.x the PARAM_SCROLL constant's @Metadata description is the simpler one-line "Set to true to enable scroll usage"; on main it was expanded to mention OpensearchScrollRequestIterator and 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 test passes for both camel-elasticsearch and camel-opensearch on 4.14.x.

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

@oscerd oscerd force-pushed the backport/23442-to-camel-4.14.x branch from 952925f to afd88fa Compare May 28, 2026 08:48
…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>
@oscerd oscerd force-pushed the backport/23442-to-camel-4.14.x branch from afd88fa to 00c1286 Compare May 28, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants