[ 
https://issues.apache.org/jira/browse/CAMEL-23574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Cosentino resolved CAMEL-23574.
--------------------------------------
    Resolution: Fixed

> camel-dns - align Exchange header constant names with Camel naming convention
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-23574
>                 URL: https://issues.apache.org/jira/browse/CAMEL-23574
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-dns
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 4.14.8, 4.18.3, 4.21.0
>
>
> The {{camel-dns}} component currently exposes its Exchange header contract 
> through dotted, non-Camel-prefixed constant names:
> ||Constant in {{DnsConstants}}||Current value||Used by||
> |{{DNS_CLASS}}|{{"dns.class"}}|DnsDigProducer, DnsLookupProducer|
> |{{DNS_NAME}}|{{"dns.name"}}|DnsDigProducer, DnsLookupProducer|
> |{{DNS_DOMAIN}}|{{"dns.domain"}}|DnsIpProducer|
> |{{DNS_SERVER}}|{{"dns.server"}}|DnsDigProducer|
> |{{DNS_TYPE}}|{{"dns.type"}}|DnsDigProducer, DnsLookupProducer|
> |{{TERM}}|{{"term"}}|DnsWikipediaProducer|
> This diverges from the project-wide {{Camel<Component><Field>}} naming 
> convention that the rest of the catalog has adopted (recent alignment work: 
> CAMEL-23506, CAMEL-23515, CAMEL-23516, CAMEL-23522, CAMEL-23526, 
> CAMEL-23532). The bare {{term}} constant also collides easily with 
> application-level header names that other components in a route may 
> legitimately set.
> *Proposed change:*
> * Rename the constants in 
> {{components/camel-dns/src/main/java/org/apache/camel/component/dns/DnsConstants.java}}:
> ** {{DNS_CLASS}}  -> {{"CamelDnsClass"}}
> ** {{DNS_NAME}}   -> {{"CamelDnsName"}}
> ** {{DNS_DOMAIN}} -> {{"CamelDnsDomain"}}
> ** {{DNS_SERVER}} -> {{"CamelDnsServer"}}
> ** {{DNS_TYPE}}   -> {{"CamelDnsType"}}
> ** {{TERM}}       -> {{"CamelDnsTerm"}}
> * Update the four producers that read these headers to use the new constants: 
> {{DnsDigProducer}}, {{DnsLookupProducer}}, {{DnsIpProducer}}, 
> {{DnsWikipediaProducer}}.
> * Keep the old header names readable for one minor as a fallback so existing 
> routes continue to work, with a log-warn nudge to migrate.
> * Update the component documentation page and the component-headers metadata 
> (catalog regeneration).
> * Add an entry to 
> {{docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc}} (and 
> the matching 4.18 / 4.14 guide files for backports) describing the rename and 
> the fallback window, mirroring the CAMEL-23526 / CAMEL-23532 entries.
> This keeps {{camel-dns}} consistent with the rest of the catalog's 
> header-naming convention.
> Affects: {{main}} (4.21.0-SNAPSHOT), {{camel-4.18.x}}, {{camel-4.14.x}} - the 
> constants and producer reads are identical across all three branches, so the 
> change should be backported.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to