Skip to content

[backport camel-4.18.x] CAMEL-23574: camel-dns - align Exchange header constant names with Camel naming convention#23459

Merged
oscerd merged 1 commit into
apache:camel-4.18.xfrom
oscerd:backport/CAMEL-23574-4.18.x
May 22, 2026
Merged

[backport camel-4.18.x] CAMEL-23574: camel-dns - align Exchange header constant names with Camel naming convention#23459
oscerd merged 1 commit into
apache:camel-4.18.xfrom
oscerd:backport/CAMEL-23574-4.18.x

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 22, 2026

Backport of #23411 to camel-4.18.x

Cherry-pick of #23411 onto camel-4.18.x (fixVersion 4.18.3).

Renames the Exchange header string values in DnsConstants from the legacy
dotted-lowercase names to the project-wide Camel<Component><Field> convention:

Constant Previous value New value
DnsConstants.DNS_CLASS dns.class CamelDnsClass
DnsConstants.DNS_NAME dns.name CamelDnsName
DnsConstants.DNS_DOMAIN dns.domain CamelDnsDomain
DnsConstants.DNS_SERVER dns.server CamelDnsServer
DnsConstants.DNS_TYPE dns.type CamelDnsType
DnsConstants.TERM term CamelDnsTerm

The Java field names are unchanged, so routes that reference the constants
symbolically keep working; routes that set the headers by literal string value
must be updated.

Notes for this backport

  • Code, in-module tests, component doc, and regenerated artifacts (component
    metadata, catalog, endpoint DSL factory) only.
  • The version-specific upgrade-guide entry (camel-4x-upgrade-guide-4_18.adoc)
    is added on main via a separate doc-sync PR, per the backport
    upgrade-guide policy (canonical guides live on main).

Original PR: #23411
Original author: @oscerd


Claude Code on behalf of Andrea Cosentino

…r constant names with Camel naming convention

Backport of apache#23411.

Rename the Exchange header string values in DnsConstants from dotted lowercase
(dns.class / dns.name / dns.domain / dns.server / dns.type / term) to the
project-wide Camel<Component><Field> convention:

  DNS_CLASS  -> CamelDnsClass
  DNS_NAME   -> CamelDnsName
  DNS_DOMAIN -> CamelDnsDomain
  DNS_SERVER -> CamelDnsServer
  DNS_TYPE   -> CamelDnsType
  TERM       -> CamelDnsTerm

The Java field names are unchanged so routes and code that reference the
constants symbolically continue to work without changes. Routes that set the
headers by their literal string value must be updated.

Updates the in-module tests to go through DnsConstants, refreshes the
DnsComponent / DnsWikipediaProducer Javadoc and the component documentation
references, and regenerates the component metadata, catalog, and endpoint DSL
factory.

The version-specific upgrade-guide entry is added on the main branch (per the
backport upgrade-guide policy), not on this maintenance branch.

Reported by Claude Code on behalf of Andrea Cosentino

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
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.

Clean backport -- LGTM.

Verified that:

  1. Clean cherry-pick: The file set matches the original PR #23411 exactly, minus the upgrade guide entry (which correctly lives on main per the backport upgrade-guide policy). All code changes, test updates, doc fixes, and regenerated artifacts are identical.

  2. Header renames are consistent: All six constants follow the CamelDns* convention (CamelDnsClass, CamelDnsName, CamelDnsDomain, CamelDnsServer, CamelDnsType, CamelDnsTerm). Java field names are unchanged so symbolic references continue to work.

  3. Tests cover the renames: All 9 test classes that previously used literal header strings ("dns.name", "dns.domain", "dns.type", "term") now use DnsConstants.* references, which resolves to the new values and exercises the producers with the renamed headers.

  4. Doc fix is correct: The pre-existing documentation error "dns.query" in the DNS Dig section (which never matched any real header -- DnsDigProducer reads DnsConstants.DNS_NAME) is correctly updated to "CamelDnsName", matching the same fix in the original PR.

  5. Upgrade guide: The PR description correctly notes that the version-specific camel-4x-upgrade-guide-4_18.adoc entry will be added on main via a separate doc-sync PR. Please make sure that doc-sync PR is filed.

  6. CI: All checks pass (JDK 17, JDK 21, dependency-review).

Claude Code on behalf of Guillaume Nodet

@oscerd oscerd merged commit 29b18be into apache:camel-4.18.x May 22, 2026
3 checks passed
oscerd added a commit that referenced this pull request May 24, 2026
…to main (#23488)

The camel-dns header constant rename (CAMEL-23574, #23411) was backported to
camel-4.18.x (4.18.3) via #23459 and to camel-4.14.x (4.14.8) via #23482. The
version-specific upgrade-guide files on main are the canonical history, so
the corresponding entries are added here on main only.

Also normalises the existing 4_21 camel-dns heading to "- potential breaking
change" to match the suffix convention now used across the catalog-wide
header-rename family (CAMEL-23577) — e.g. camel-cxf, camel-jgroups,
camel-jira, camel-aws-bedrock.

Reported by Claude Code on behalf of Andrea Cosentino

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
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