This is an automated email from the ASF dual-hosted git repository.
oscerd pushed a commit to branch camel-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.18.x by this push:
new 12ff094d6e1b CAMEL-23590: camel-milo - align Exchange header constant
names with Camel naming convention (#23474) (#23509)
12ff094d6e1b is described below
commit 12ff094d6e1b55f4feed71af850c63bb9b370c71
Author: Andrea Cosentino <[email protected]>
AuthorDate: Tue May 26 11:22:31 2026 +0200
CAMEL-23590: camel-milo - align Exchange header constant names with Camel
naming convention (#23474) (#23509)
* CAMEL-23590: camel-milo - align Exchange header constant names with Camel
naming convention
Renames the MiloConstants.HEADER_AWAIT header string value from "await"
(which
is outside the Camel namespace and therefore not filtered by the default
HeaderFilterStrategy) to "CamelMiloAwait", 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 name is unchanged so routes referencing the constant
symbolically continue to work; routes using the literal string value must be
updated (documented in the 4.21 upgrade guide).
MiloConstants.HEADER_NODE_IDS
was already Camel-prefixed (CamelMiloNodeIds) and is unchanged.
Updates the two tests (WriteClientTest, CallClientTest) that set the header
by
its literal value. The generated Endpoint DSL header accessor await() on
MiloClientHeaderNameBuilder has been renamed to miloAwait().
Tracker: CAMEL-23577
Reported by Claude Code on behalf of Andrea Cosentino
* CAMEL-23590: address review - update milo-client doc example to new
header value
Updates the route example in
components/camel-milo/src/main/docs/milo-client-component.adoc
that quoted the old literal header value "await" to use the new
"CamelMiloAwait" value introduced by this PR.
Addresses Guillaume Nodet's review on #23474.
Reported by Claude Code on behalf of Andrea Cosentino
---------
Signed-off-by: Andrea Cosentino <[email protected]>
---
.../camel/catalog/components/milo-client.json | 2 +-
.../camel/component/milo/client/milo-client.json | 2 +-
.../src/main/docs/milo-client-component.adoc | 2 +-
.../apache/camel/component/milo/MiloConstants.java | 2 +-
.../camel/component/milo/WriteClientTest.java | 2 +-
.../camel/component/milo/call/CallClientTest.java | 2 +-
.../ROOT/pages/camel-4x-upgrade-guide-4_18.adoc | 26 ++++++++++++++++++++++
.../dsl/MiloClientEndpointBuilderFactory.java | 6 ++---
8 files changed, 35 insertions(+), 9 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/milo-client.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/milo-client.json
index 29cd9efc032c..d6f6bc1bf0ec 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/milo-client.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/milo-client.json
@@ -53,7 +53,7 @@
},
"headers": {
"CamelMiloNodeIds": { "index": 0, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"List", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "The node ids.", "constantName":
"org.apache.camel.component.milo.MiloConstants#HEADER_NODE_IDS" },
- "await": { "index": 1, "kind": "header", "displayName": "", "group":
"producer", "label": "producer", "required": false, "javaType": "Boolean",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The await setting for writes.", "constantName":
"org.apache.camel.component.milo.MiloConstants#HEADER_AWAIT" }
+ "CamelMiloAwait": { "index": 1, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"Boolean", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "The await setting for writes.",
"constantName": "org.apache.camel.component.milo.MiloConstants#HEADER_AWAIT" }
},
"properties": {
"endpointUri": { "index": 0, "kind": "path", "displayName": "Endpoint
Uri", "group": "common", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "The OPC UA server
endpoint" },
diff --git
a/components/camel-milo/src/generated/resources/META-INF/org/apache/camel/component/milo/client/milo-client.json
b/components/camel-milo/src/generated/resources/META-INF/org/apache/camel/component/milo/client/milo-client.json
index 29cd9efc032c..d6f6bc1bf0ec 100644
---
a/components/camel-milo/src/generated/resources/META-INF/org/apache/camel/component/milo/client/milo-client.json
+++
b/components/camel-milo/src/generated/resources/META-INF/org/apache/camel/component/milo/client/milo-client.json
@@ -53,7 +53,7 @@
},
"headers": {
"CamelMiloNodeIds": { "index": 0, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"List", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "The node ids.", "constantName":
"org.apache.camel.component.milo.MiloConstants#HEADER_NODE_IDS" },
- "await": { "index": 1, "kind": "header", "displayName": "", "group":
"producer", "label": "producer", "required": false, "javaType": "Boolean",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The await setting for writes.", "constantName":
"org.apache.camel.component.milo.MiloConstants#HEADER_AWAIT" }
+ "CamelMiloAwait": { "index": 1, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"Boolean", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "The await setting for writes.",
"constantName": "org.apache.camel.component.milo.MiloConstants#HEADER_AWAIT" }
},
"properties": {
"endpointUri": { "index": 0, "kind": "path", "displayName": "Endpoint
Uri", "group": "common", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "The OPC UA server
endpoint" },
diff --git a/components/camel-milo/src/main/docs/milo-client-component.adoc
b/components/camel-milo/src/main/docs/milo-client-component.adoc
index 7833d9da2502..aabf96826b4b 100644
--- a/components/camel-milo/src/main/docs/milo-client-component.adoc
+++ b/components/camel-milo/src/main/docs/milo-client-component.adoc
@@ -136,7 +136,7 @@ Example:
----
from("direct:start")
.setHeader("CamelMiloNodeIds",
constant(Arrays.asList("nsu=urn:org:apache:camel;s=myitem1")))
- .setHeader("await", constant(true)) // await: parameter
"defaultAwaitWrites"
+ .setHeader("CamelMiloAwait", constant(true)) // CamelMiloAwait: parameter
"defaultAwaitWrites"
.enrich("milo-client:opc.tcp://localhost:4334", new
AggregationStrategy() {
@Override
diff --git
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/MiloConstants.java
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/MiloConstants.java
index 96ac5618b860..b4c11dc57e24 100644
---
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/MiloConstants.java
+++
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/MiloConstants.java
@@ -29,7 +29,7 @@ public final class MiloConstants {
public static final String HEADER_NODE_IDS = "CamelMiloNodeIds";
@Metadata(label = "producer", description = "The \"await\" setting for
writes.", javaType = "Boolean",
applicableFor = SCHEME_CLIENT)
- public static final String HEADER_AWAIT = "await";
+ public static final String HEADER_AWAIT = "CamelMiloAwait";
private MiloConstants() {
diff --git
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/WriteClientTest.java
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/WriteClientTest.java
index b4cfeab95581..e225a6bb253e 100644
---
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/WriteClientTest.java
+++
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/WriteClientTest.java
@@ -171,6 +171,6 @@ public class WriteClientTest extends AbstractMiloServerTest
{
private static void sendValue(final ProducerTemplate producerTemplate,
final Variant variant) {
// we always write synchronously since we do need the message order
- producerTemplate.sendBodyAndHeader(variant, "await", true);
+ producerTemplate.sendBodyAndHeader(variant, "CamelMiloAwait", true);
}
}
diff --git
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/call/CallClientTest.java
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/call/CallClientTest.java
index 90c4846cd752..5e5ff94b3916 100644
---
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/call/CallClientTest.java
+++
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/call/CallClientTest.java
@@ -208,6 +208,6 @@ public class CallClientTest extends AbstractMiloServerTest {
private static void doCall(final ProducerTemplate producerTemplate, final
Object input) {
// we always write synchronously since we do need the message order
- producerTemplate.sendBodyAndHeader(input, "await", true);
+ producerTemplate.sendBodyAndHeader(input, "CamelMiloAwait", true);
}
}
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc
index e9d2d10d9f59..a313cd8b298d 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc
@@ -717,3 +717,29 @@ between the transport `from` and the `cxf:` `to`:
The same pattern applies to HTTP-based bridges (`platform-http`/`jetty`/`netty
-http`/`http` -> `cxf:`) and any other transport whose default
`HeaderFilterStrategy` filters `Camel*` headers.
+
+=== camel-milo - potential breaking change
+
+The `MiloConstants.HEADER_AWAIT` constant, which controls whether milo-client
+writes are awaited, used the header value `await` — outside the `Camel`
+namespace and therefore not filtered by the default `HeaderFilterStrategy`. It
+has been renamed to follow the Camel naming convention. The Java field name is
+unchanged; only the header string value has changed:
+
+[options="header"]
+|===
+| Constant | Previous value | New value
+| `MiloConstants.HEADER_AWAIT` | `await` | `CamelMiloAwait`
+|===
+
+`MiloConstants.HEADER_NODE_IDS` was already `Camel`-prefixed
+(`CamelMiloNodeIds`) and is unchanged.
+
+Routes that reference the constant symbolically (for example
+`setHeader(MiloConstants.HEADER_AWAIT, ...)`) continue to work without changes.
+Routes that set the header by its literal string value (for example
+`setHeader("await", ...)`) must be updated to use the new value
+(`setHeader("CamelMiloAwait", ...)`).
+
+As a consequence, the generated Endpoint DSL header accessor `await()` on
+`MiloClientHeaderNameBuilder` has been renamed to `miloAwait()`.
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MiloClientEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MiloClientEndpointBuilderFactory.java
index 355c7d48dc95..2db17c527382 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MiloClientEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MiloClientEndpointBuilderFactory.java
@@ -2351,10 +2351,10 @@ public interface MiloClientEndpointBuilderFactory {
*
* Group: producer
*
- * @return the name of the header {@code await}.
+ * @return the name of the header {@code MiloAwait}.
*/
- public String await() {
- return "await";
+ public String miloAwait() {
+ return "CamelMiloAwait";
}
}
static MiloClientEndpointBuilder endpointBuilder(String componentName,
String path) {