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 35300ea3b634b..73e3dabb3dd9d 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 35300ea3b634b..73e3dabb3dd9d 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 6b4ac33047dd1..6bfd1319d01c6 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 96ac5618b8604..b4c11dc57e246 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 b4cfeab955811..e225a6bb253e5 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 void testWrite3() throws Exception { 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 90c4846cd7529..5e5ff94b3916b 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 void testCall1() { 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_21.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc index db2adbf4800f5..4104b7dc77d5a 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc @@ -1320,6 +1320,32 @@ As a consequence, the generated Endpoint DSL header accessors on `MailHeaderNameBuilder` have been renamed: `copyTo()` -> `mailCopyTo()`, `moveTo()` -> `mailMoveTo()`, and `delete()` -> `mailDelete()`. +=== 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()`. + === Jackson dataformat documentation pages renamed The Jackson 2.x and Jackson 3.x lines ship the same dataformat names (`jackson`, `jacksonXml`, 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 355c7d48dc95e..2db17c5273820 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 String miloNodeIds() { * * 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) {