Skip to content

[backport camel-4.14.x] CAMEL-23578: camel-web3j - align Exchange header constant names with Camel naming convention#23570

Merged
oscerd merged 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23435-to-camel-4.14.x
May 28, 2026
Merged

[backport camel-4.14.x] CAMEL-23578: camel-web3j - align Exchange header constant names with Camel naming convention#23570
oscerd merged 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23435-to-camel-4.14.x

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 27, 2026

Backports #23435 to camel-4.14.x. Standard 4_21 → 4_14 guide-file adaptation. ~38 @Metadata-annotated header values renamed to CamelWeb3j* prefix; producer operation-enum identifiers kept; OPERATION constant gains @Metadata. Tests updated for the URI-param-vs-header distinction (10 tests). mvn test passes on 4.14.x.

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

@oscerd oscerd force-pushed the backport/23435-to-camel-4.14.x branch from 8fb097b to 65d2287 Compare May 28, 2026 08:48
…Camel naming convention (apache#23435)

Renames the Exchange header string values in Web3jConstants from non-Camel
prefixed values (OPERATION, FROM_ADDRESS, TO_ADDRESS, VALUE,
SIGNED_TRANSACTION_DATA, SHA3_HASH_OF_DATA_TO_SIGN, ETH_HASHRATE,
GAS_PRICE, GAS_LIMIT, ...) to CamelWeb3j<Name>, 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 (OPERATION, FROM_ADDRESS, ...) 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 producer-side dispatch operation identifiers
(WEB3_CLIENT_VERSION, ETH_GAS_PRICE, ETH_SEND_TRANSACTION, ...) keep
their previous string values because they are operation enum values
rather than Exchange header names; only ETH_HASHRATE is dual-purpose
(both an operation identifier and an input header) and is therefore
renamed alongside the other header names.

The OPERATION constant gains an @metadata annotation so it now appears
in the catalog as the producer dispatch header.

The generated Endpoint DSL header accessors on Web3jHeaderNameBuilder
have been renamed accordingly (fromAddress() -> web3jFromAddress(),
toAddress() -> web3jToAddress(), ethHashrate() -> web3jEthHashrate(),
iD() -> web3jId(), ...). Updates the tests that used
Web3jConstants.OPERATION.toLowerCase() as the endpoint URI parameter
name to use the literal "operation" parameter (the URI parameter
controls the configuration.operation field and is unrelated to the
header rename).

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/23435-to-camel-4.14.x branch 2 times, most recently from 65d2287 to 06dd946 Compare May 28, 2026 15:02
@oscerd oscerd merged commit ee827cf into apache:camel-4.14.x May 28, 2026
1 check passed
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