diff --git a/Jenkinsfile.talend b/Jenkinsfile.talend index 024e660ccf4c1..dc7c3117ab68f 100644 --- a/Jenkinsfile.talend +++ b/Jenkinsfile.talend @@ -54,6 +54,7 @@ org.apache.camel:camel-infinispan,\ org.apache.camel:camel-jaxb,\ org.apache.camel:camel-jms,\ org.apache.camel:camel-jsonpath,\ +org.apache.camel:camel-kafka,\ org.apache.camel:camel-knative-http,\ org.apache.camel:camel-kubernetes,\ org.apache.camel:camel-langchain4j-core,\ diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxf.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxf.json index 867dc81ba36c0..83a3378876d1e 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxf.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxf.json @@ -33,8 +33,8 @@ "useGlobalSslContextParameters": { "index": 6, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } }, "headers": { - "operationName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the operation.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" }, - "operationNamespace": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation namespace.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAMESPACE" }, + "CamelCxfOperationName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the operation.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" }, + "CamelCxfOperationNamespace": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation namespace.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAMESPACE" }, "CamelDestinationOverrideUrl": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The destination override url", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#DESTINATION_OVERRIDE_URL" }, "ResponseContext": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Map", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The response context", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#RESPONSE_CONTEXT" }, "CamelAuthentication": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "javax.security.auth.Subject", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The authentication", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#AUTHENTICATION" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxfrs.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxfrs.json index 7be5a0518358b..a1e5e5c18c2ee 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxfrs.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxfrs.json @@ -32,7 +32,7 @@ "useGlobalSslContextParameters": { "index": 5, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } }, "headers": { - "operationName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the operation.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" }, + "CamelCxfOperationName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the operation.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" }, "CamelAuthentication": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "javax.security.auth.Subject", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The authentication", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#AUTHENTICATION" }, "CamelHttpMethod": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The http method to use", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#HTTP_METHOD" }, "CamelHttpPath": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The http path", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#HTTP_PATH" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json index 54d00f649aaed..a8c6cff6902de 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json @@ -141,18 +141,18 @@ "useGlobalSslContextParameters": { "index": 115, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } }, "headers": { - "kafka.PARTITION_KEY": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Explicitly specify the partition", "constantName": "org.apache.camel.component.kafka.KafkaConstants#PARTITION_KEY" }, - "kafka.PARTITION": { "index": 1, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The partition where the message was stored", "constantName": "org.apache.camel.component.kafka.KafkaConstants#PARTITION" }, - "kafka.KEY": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": true, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Producer: The key of the message in order to ensure that all related message goes in the same partition. Consumer: The key of the message if configured", "constantName": "org.apache.camel.component.kafka.KafkaConstants#KEY" }, - "kafka.TOPIC": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The topic from where the message originated", "constantName": "org.apache.camel.component.kafka.KafkaConstants#TOPIC" }, - "kafka.OVERRIDE_TOPIC": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The topic to which send the message (override and takes precedence), and the header is not preserved.", "constantName": "org.apache.camel.component.kafka.KafkaConstants#OVERRIDE_TOPIC" }, - "kafka.OFFSET": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The offset of the message", "constantName": "org.apache.camel.component.kafka.KafkaConstants#OFFSET" }, - "kafka.HEADERS": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.apache.kafka.common.header.Headers", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The record headers", "constantName": "org.apache.camel.component.kafka.KafkaConstants#HEADERS" }, - "kafka.LAST_RECORD_BEFORE_COMMIT": { "index": 7, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether or not it's the last record before commit (only available if autoCommitEnable endpoint parameter is false)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#LAST_RECORD_BEFORE_COMMIT" }, - "kafka.LAST_POLL_RECORD": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Indicates the last record within the current poll request (only available if autoCommitEnable endpoint parameter is false or allowManualCommit is true)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#LAST_POLL_RECORD" }, - "kafka.TIMESTAMP": { "index": 9, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The timestamp of the message", "constantName": "org.apache.camel.component.kafka.KafkaConstants#TIMESTAMP" }, - "kafka.OVERRIDE_TIMESTAMP": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ProducerRecord also has an associated timestamp. If the user did provide a timestamp, the producer will stamp the record with the provided timestamp and the header is not preserved.", "constantName": "org.apache.camel.component.kafka.KafkaConstants#OVERRIDE_TIMESTAMP" }, - "kafka.RECORD_META": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The metadata (only configured if recordMetadata endpoint parameter is true)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#KAFKA_RECORD_META" }, + "CamelKafkaPartitionKey": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Explicitly specify the partition", "constantName": "org.apache.camel.component.kafka.KafkaConstants#PARTITION_KEY" }, + "CamelKafkaPartition": { "index": 1, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The partition where the message was stored", "constantName": "org.apache.camel.component.kafka.KafkaConstants#PARTITION" }, + "CamelKafkaKey": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": true, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Producer: The key of the message in order to ensure that all related message goes in the same partition. Consumer: The key of the message if configured", "constantName": "org.apache.camel.component.kafka.KafkaConstants#KEY" }, + "CamelKafkaTopic": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The topic from where the message originated", "constantName": "org.apache.camel.component.kafka.KafkaConstants#TOPIC" }, + "CamelKafkaOverrideTopic": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The topic to which send the message (override and takes precedence), and the header is not preserved.", "constantName": "org.apache.camel.component.kafka.KafkaConstants#OVERRIDE_TOPIC" }, + "CamelKafkaOffset": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The offset of the message", "constantName": "org.apache.camel.component.kafka.KafkaConstants#OFFSET" }, + "CamelKafkaHeaders": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.apache.kafka.common.header.Headers", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The record headers", "constantName": "org.apache.camel.component.kafka.KafkaConstants#HEADERS" }, + "CamelKafkaLastRecordBeforeCommit": { "index": 7, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether or not it's the last record before commit (only available if autoCommitEnable endpoint parameter is false)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#LAST_RECORD_BEFORE_COMMIT" }, + "CamelKafkaLastPollRecord": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Indicates the last record within the current poll request (only available if autoCommitEnable endpoint parameter is false or allowManualCommit is true)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#LAST_POLL_RECORD" }, + "CamelKafkaTimestamp": { "index": 9, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The timestamp of the message", "constantName": "org.apache.camel.component.kafka.KafkaConstants#TIMESTAMP" }, + "CamelKafkaOverrideTimestamp": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ProducerRecord also has an associated timestamp. If the user did provide a timestamp, the producer will stamp the record with the provided timestamp and the header is not preserved.", "constantName": "org.apache.camel.component.kafka.KafkaConstants#OVERRIDE_TIMESTAMP" }, + "CamelKafkaRecordMeta": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The metadata (only configured if recordMetadata endpoint parameter is true)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#KAFKA_RECORD_META" }, "CamelKafkaManualCommit": { "index": 12, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.apache.camel.component.kafka.consumer.KafkaManualCommit", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Can be used for forcing manual offset commit when using Kafka consumer.", "constantName": "org.apache.camel.component.kafka.KafkaConstants#MANUAL_COMMIT" } }, "properties": { diff --git a/components/camel-cxf/camel-cxf-common/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java b/components/camel-cxf/camel-cxf-common/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java index f7210e2ce1547..8a1b760b13e9f 100644 --- a/components/camel-cxf/camel-cxf-common/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java +++ b/components/camel-cxf/camel-cxf-common/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java @@ -46,9 +46,9 @@ public final class CxfConstants { public static final String PROTOCOL_NAME_RES = "res"; @Metadata(description = "The name of the operation.", javaType = "String") - public static final String OPERATION_NAME = "operationName"; + public static final String OPERATION_NAME = "CamelCxfOperationName"; @Metadata(description = "The operation namespace.", javaType = "String", applicableFor = SCHEME_CXF) - public static final String OPERATION_NAMESPACE = "operationNamespace"; + public static final String OPERATION_NAMESPACE = "CamelCxfOperationNamespace"; public static final String SPRING_CONTEXT_ENDPOINT = "bean:"; @Metadata(description = "The destination override url", javaType = "String", applicableFor = SCHEME_CXF) public static final String DESTINATION_OVERRIDE_URL = Exchange.DESTINATION_OVERRIDE_URL; diff --git a/components/camel-cxf/camel-cxf-rest/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxrs/cxfrs.json b/components/camel-cxf/camel-cxf-rest/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxrs/cxfrs.json index cc4e0c3d1395a..3c906af543c37 100644 --- a/components/camel-cxf/camel-cxf-rest/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxrs/cxfrs.json +++ b/components/camel-cxf/camel-cxf-rest/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxrs/cxfrs.json @@ -32,7 +32,7 @@ "useGlobalSslContextParameters": { "index": 5, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } }, "headers": { - "operationName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the operation.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" }, + "CamelCxfOperationName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the operation.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" }, "CamelAuthentication": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "javax.security.auth.Subject", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The authentication", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#AUTHENTICATION" }, "CamelHttpMethod": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The http method to use", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#HTTP_METHOD" }, "CamelHttpPath": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The http path", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#HTTP_PATH" }, diff --git a/components/camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc b/components/camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc index 9042ad7e9111b..af191dd4bd5dd 100644 --- a/components/camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc +++ b/components/camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc @@ -190,7 +190,7 @@ Serviced by the following route: [source,java] -------------------------------------------------------------------------------------------- from("cxfrs:bean:rsServer?bindingStyle=SimpleConsumer") - .recipientList(simple("direct:${header.operationName}")); + .recipientList(simple("direct:${header.CamelCxfOperationName}")); from("direct:newCustomer") .log("Request: type=${header.type}, active=${header.active}, customerData=${body}"); diff --git a/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java b/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java index becba92d8a579..3aceac0080c5a 100644 --- a/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java +++ b/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java @@ -68,7 +68,7 @@ protected RouteBuilder createRouteBuilder() throws Exception { @Override public void configure() { from(CXF_RS_ENDPOINT_URI) - .recipientList(simple("direct:${header.operationName}")); + .recipientList(simple("direct:${header.CamelCxfOperationName}")); from("direct:getCustomer").process(new Processor() { @Override diff --git a/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java b/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java index dd3473c9a2b62..c8c41757b0be6 100644 --- a/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java +++ b/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java @@ -85,7 +85,7 @@ protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() { from(CXF_RS_ENDPOINT_URI) - .recipientList(simple("direct:${header.operationName}")); + .recipientList(simple("direct:${header.CamelCxfOperationName}")); from("direct:getCustomer").process(new Processor() { public void process(Exchange exchange) throws Exception { diff --git a/components/camel-cxf/camel-cxf-soap/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxws/cxf.json b/components/camel-cxf/camel-cxf-soap/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxws/cxf.json index 0a044ed52d3a7..701a6761f34fd 100644 --- a/components/camel-cxf/camel-cxf-soap/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxws/cxf.json +++ b/components/camel-cxf/camel-cxf-soap/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxws/cxf.json @@ -33,8 +33,8 @@ "useGlobalSslContextParameters": { "index": 6, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } }, "headers": { - "operationName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the operation.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" }, - "operationNamespace": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation namespace.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAMESPACE" }, + "CamelCxfOperationName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the operation.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" }, + "CamelCxfOperationNamespace": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation namespace.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAMESPACE" }, "CamelDestinationOverrideUrl": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The destination override url", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#DESTINATION_OVERRIDE_URL" }, "ResponseContext": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Map", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The response context", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#RESPONSE_CONTEXT" }, "CamelAuthentication": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "javax.security.auth.Subject", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The authentication", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#AUTHENTICATION" }, diff --git a/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc b/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc index c646a081b0783..e4d134cd08b13 100644 --- a/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc +++ b/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc @@ -438,7 +438,7 @@ As an alternative, you can add a message header for it as demonstrated in https: You can configure the CXF endpoint with the Spring configuration file shown below, and you can also embed the endpoint into the `camelContext` tags. When you are invoking the service endpoint, you can set the -`operationName` and `operationNamespace` headers to explicitly state +`CamelCxfOperationName` and `CamelCxfOperationNamespace` headers to explicitly state which operation you are calling. [source,xml] diff --git a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfProducer.java b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfProducer.java index ca713e0ebe9b5..33b674edecdf7 100644 --- a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfProducer.java +++ b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfProducer.java @@ -408,7 +408,7 @@ private Object[] getParams(CxfEndpoint endpoint, Exchange exchange) * null: *

*
    - *
  • Using the in message header "operationName".
  • + *
  • Using the in message header "CamelCxfOperationName".
  • *
  • Using the defaultOperationName option value from the CxfEndpoint.
  • *
  • Using the first operation which is find from the CxfEndpoint Operations list.
  • *
      diff --git a/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java b/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java index becba92d8a579..3aceac0080c5a 100644 --- a/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java +++ b/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java @@ -68,7 +68,7 @@ protected RouteBuilder createRouteBuilder() throws Exception { @Override public void configure() { from(CXF_RS_ENDPOINT_URI) - .recipientList(simple("direct:${header.operationName}")); + .recipientList(simple("direct:${header.CamelCxfOperationName}")); from("direct:getCustomer").process(new Processor() { @Override diff --git a/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java b/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java index 736ba3f15ef89..05b6139980bcf 100644 --- a/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java +++ b/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java @@ -85,7 +85,7 @@ protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() { from(CXF_RS_ENDPOINT_URI) - .recipientList(simple("direct:${header.operationName}")); + .recipientList(simple("direct:${header.CamelCxfOperationName}")); from("direct:getCustomer").process(new Processor() { public void process(Exchange exchange) throws Exception { diff --git a/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfPayloadProviderRouterTest.java b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfPayloadProviderRouterTest.java index 7b8ada2c688a9..870881e0b9ed6 100644 --- a/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfPayloadProviderRouterTest.java +++ b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfPayloadProviderRouterTest.java @@ -22,6 +22,7 @@ import javax.xml.namespace.QName; import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.cxf.common.message.CxfConstants; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.message.Message; import org.apache.cxf.phase.AbstractPhaseInterceptor; @@ -68,8 +69,9 @@ protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { from("cxf:bean:routerEndpoint?synchronous=true&dataFormat=PAYLOAD") - .setHeader("operationNamespace", constant("http://camel.apache.org/cxf/jaxws/dispatch")) - .setHeader("operationName", constant("Invoke")) + .setHeader(CxfConstants.OPERATION_NAMESPACE, + constant("http://camel.apache.org/cxf/jaxws/dispatch")) + .setHeader(CxfConstants.OPERATION_NAME, constant("Invoke")) .to("cxf:bean:serviceEndpoint?synchronous=true&dataFormat=PAYLOAD"); } }; diff --git a/components/camel-kafka/pom.xml b/components/camel-kafka/pom.xml index 1a50196392961..4e84650cb041a 100644 --- a/components/camel-kafka/pom.xml +++ b/components/camel-kafka/pom.xml @@ -30,6 +30,11 @@ jar Camel :: Kafka Camel Kafka support + ${revision} + + + ${camel-kafka.tesb.version} + diff --git a/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json b/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json index 54d00f649aaed..a8c6cff6902de 100644 --- a/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json +++ b/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json @@ -141,18 +141,18 @@ "useGlobalSslContextParameters": { "index": 115, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } }, "headers": { - "kafka.PARTITION_KEY": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Explicitly specify the partition", "constantName": "org.apache.camel.component.kafka.KafkaConstants#PARTITION_KEY" }, - "kafka.PARTITION": { "index": 1, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The partition where the message was stored", "constantName": "org.apache.camel.component.kafka.KafkaConstants#PARTITION" }, - "kafka.KEY": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": true, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Producer: The key of the message in order to ensure that all related message goes in the same partition. Consumer: The key of the message if configured", "constantName": "org.apache.camel.component.kafka.KafkaConstants#KEY" }, - "kafka.TOPIC": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The topic from where the message originated", "constantName": "org.apache.camel.component.kafka.KafkaConstants#TOPIC" }, - "kafka.OVERRIDE_TOPIC": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The topic to which send the message (override and takes precedence), and the header is not preserved.", "constantName": "org.apache.camel.component.kafka.KafkaConstants#OVERRIDE_TOPIC" }, - "kafka.OFFSET": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The offset of the message", "constantName": "org.apache.camel.component.kafka.KafkaConstants#OFFSET" }, - "kafka.HEADERS": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.apache.kafka.common.header.Headers", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The record headers", "constantName": "org.apache.camel.component.kafka.KafkaConstants#HEADERS" }, - "kafka.LAST_RECORD_BEFORE_COMMIT": { "index": 7, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether or not it's the last record before commit (only available if autoCommitEnable endpoint parameter is false)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#LAST_RECORD_BEFORE_COMMIT" }, - "kafka.LAST_POLL_RECORD": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Indicates the last record within the current poll request (only available if autoCommitEnable endpoint parameter is false or allowManualCommit is true)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#LAST_POLL_RECORD" }, - "kafka.TIMESTAMP": { "index": 9, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The timestamp of the message", "constantName": "org.apache.camel.component.kafka.KafkaConstants#TIMESTAMP" }, - "kafka.OVERRIDE_TIMESTAMP": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ProducerRecord also has an associated timestamp. If the user did provide a timestamp, the producer will stamp the record with the provided timestamp and the header is not preserved.", "constantName": "org.apache.camel.component.kafka.KafkaConstants#OVERRIDE_TIMESTAMP" }, - "kafka.RECORD_META": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The metadata (only configured if recordMetadata endpoint parameter is true)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#KAFKA_RECORD_META" }, + "CamelKafkaPartitionKey": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Explicitly specify the partition", "constantName": "org.apache.camel.component.kafka.KafkaConstants#PARTITION_KEY" }, + "CamelKafkaPartition": { "index": 1, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The partition where the message was stored", "constantName": "org.apache.camel.component.kafka.KafkaConstants#PARTITION" }, + "CamelKafkaKey": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": true, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Producer: The key of the message in order to ensure that all related message goes in the same partition. Consumer: The key of the message if configured", "constantName": "org.apache.camel.component.kafka.KafkaConstants#KEY" }, + "CamelKafkaTopic": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The topic from where the message originated", "constantName": "org.apache.camel.component.kafka.KafkaConstants#TOPIC" }, + "CamelKafkaOverrideTopic": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The topic to which send the message (override and takes precedence), and the header is not preserved.", "constantName": "org.apache.camel.component.kafka.KafkaConstants#OVERRIDE_TOPIC" }, + "CamelKafkaOffset": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The offset of the message", "constantName": "org.apache.camel.component.kafka.KafkaConstants#OFFSET" }, + "CamelKafkaHeaders": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.apache.kafka.common.header.Headers", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The record headers", "constantName": "org.apache.camel.component.kafka.KafkaConstants#HEADERS" }, + "CamelKafkaLastRecordBeforeCommit": { "index": 7, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether or not it's the last record before commit (only available if autoCommitEnable endpoint parameter is false)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#LAST_RECORD_BEFORE_COMMIT" }, + "CamelKafkaLastPollRecord": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Indicates the last record within the current poll request (only available if autoCommitEnable endpoint parameter is false or allowManualCommit is true)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#LAST_POLL_RECORD" }, + "CamelKafkaTimestamp": { "index": 9, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The timestamp of the message", "constantName": "org.apache.camel.component.kafka.KafkaConstants#TIMESTAMP" }, + "CamelKafkaOverrideTimestamp": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ProducerRecord also has an associated timestamp. If the user did provide a timestamp, the producer will stamp the record with the provided timestamp and the header is not preserved.", "constantName": "org.apache.camel.component.kafka.KafkaConstants#OVERRIDE_TIMESTAMP" }, + "CamelKafkaRecordMeta": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The metadata (only configured if recordMetadata endpoint parameter is true)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#KAFKA_RECORD_META" }, "CamelKafkaManualCommit": { "index": 12, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.apache.camel.component.kafka.consumer.KafkaManualCommit", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Can be used for forcing manual offset commit when using Kafka consumer.", "constantName": "org.apache.camel.component.kafka.KafkaConstants#MANUAL_COMMIT" } }, "properties": { diff --git a/components/camel-kafka/src/main/docs/kafka-component.adoc b/components/camel-kafka/src/main/docs/kafka-component.adoc index 5ec132be9b348..f3653d6bded29 100644 --- a/components/camel-kafka/src/main/docs/kafka-component.adoc +++ b/components/camel-kafka/src/main/docs/kafka-component.adoc @@ -570,10 +570,10 @@ Here is the minimal route you need to read messages from Kafka. ---- from("kafka:test?brokers=localhost:9092") .log("Message received from Kafka : ${body}") - .log(" on the topic ${headers[kafka.TOPIC]}") - .log(" on the partition ${headers[kafka.PARTITION]}") - .log(" with the offset ${headers[kafka.OFFSET]}") - .log(" with the key ${headers[kafka.KEY]}") + .log(" on the topic ${headers[CamelKafkaTopic]}") + .log(" on the partition ${headers[CamelKafkaPartition]}") + .log(" with the offset ${headers[CamelKafkaOffset]}") + .log(" with the key ${headers[CamelKafkaKey]}") ---- If you need to consume messages from multiple topics, you can use a comma separated list of topic names. @@ -582,10 +582,10 @@ If you need to consume messages from multiple topics, you can use a comma separa ---- from("kafka:test,test1,test2?brokers=localhost:9092") .log("Message received from Kafka : ${body}") - .log(" on the topic ${headers[kafka.TOPIC]}") - .log(" on the partition ${headers[kafka.PARTITION]}") - .log(" with the offset ${headers[kafka.OFFSET]}") - .log(" with the key ${headers[kafka.KEY]}") + .log(" on the topic ${headers[CamelKafkaTopic]}") + .log(" on the partition ${headers[CamelKafkaPartition]}") + .log(" with the offset ${headers[CamelKafkaOffset]}") + .log(" with the key ${headers[CamelKafkaKey]}") ---- It's also possible to subscribe to multiple topics giving a pattern as the topic name and using the `topicIsPattern` option. @@ -594,10 +594,10 @@ It's also possible to subscribe to multiple topics giving a pattern as the topic ---- from("kafka:test.*?brokers=localhost:9092&topicIsPattern=true") .log("Message received from Kafka : ${body}") - .log(" on the topic ${headers[kafka.TOPIC]}") - .log(" on the partition ${headers[kafka.PARTITION]}") - .log(" with the offset ${headers[kafka.OFFSET]}") - .log(" with the key ${headers[kafka.KEY]}") + .log(" on the topic ${headers[CamelKafkaTopic]}") + .log(" on the partition ${headers[CamelKafkaPartition]}") + .log(" with the offset ${headers[CamelKafkaOffset]}") + .log(" with the key ${headers[CamelKafkaKey]}") ---- When consuming messages from Kafka, you can use your own offset management and not delegate this management to Kafka. diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConstants.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConstants.java index 5fc3e184bda15..9779c22ba62ce 100644 --- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConstants.java +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConstants.java @@ -21,38 +21,38 @@ public final class KafkaConstants { @Metadata(label = "producer", description = "Explicitly specify the partition", javaType = "Integer") - public static final String PARTITION_KEY = "kafka.PARTITION_KEY"; + public static final String PARTITION_KEY = "CamelKafkaPartitionKey"; @Metadata(label = "consumer", description = "The partition where the message was stored", javaType = "Integer") - public static final String PARTITION = "kafka.PARTITION"; + public static final String PARTITION = "CamelKafkaPartition"; @Metadata(description = "*Producer:* The key of the message in order to ensure that all related message goes in the same partition. " + "*Consumer:* The key of the message if configured", javaType = "Object", required = true) - public static final String KEY = "kafka.KEY"; + public static final String KEY = "CamelKafkaKey"; @Metadata(label = "consumer", description = "The topic from where the message originated", javaType = "String") - public static final String TOPIC = "kafka.TOPIC"; + public static final String TOPIC = "CamelKafkaTopic"; @Metadata(label = "producer", description = "The topic to which send the message (override and takes precedence), and the header is not preserved.", javaType = "String") - public static final String OVERRIDE_TOPIC = "kafka.OVERRIDE_TOPIC"; + public static final String OVERRIDE_TOPIC = "CamelKafkaOverrideTopic"; @Metadata(label = "consumer", description = "The offset of the message", javaType = "Long") - public static final String OFFSET = "kafka.OFFSET"; + public static final String OFFSET = "CamelKafkaOffset"; @Metadata(label = "consumer", description = "The record headers", javaType = "org.apache.kafka.common.header.Headers") - public static final String HEADERS = "kafka.HEADERS"; + public static final String HEADERS = "CamelKafkaHeaders"; @Metadata(label = "consumer", description = "Whether or not it's the last record before commit (only available if `autoCommitEnable` endpoint parameter is `false`)", javaType = "Boolean") - public static final String LAST_RECORD_BEFORE_COMMIT = "kafka.LAST_RECORD_BEFORE_COMMIT"; + public static final String LAST_RECORD_BEFORE_COMMIT = "CamelKafkaLastRecordBeforeCommit"; @Metadata(label = "consumer", description = "Indicates the last record within the current poll request " + "(only available if `autoCommitEnable` endpoint parameter is `false` or `allowManualCommit` is `true`)", javaType = "Boolean") - public static final String LAST_POLL_RECORD = "kafka.LAST_POLL_RECORD"; + public static final String LAST_POLL_RECORD = "CamelKafkaLastPollRecord"; @Metadata(label = "consumer", description = "The timestamp of the message", javaType = "Long") - public static final String TIMESTAMP = "kafka.TIMESTAMP"; + public static final String TIMESTAMP = "CamelKafkaTimestamp"; @Metadata(label = "producer", description = "The ProducerRecord also has an associated timestamp. " + "If the user did provide a timestamp, the producer will stamp the record with the provided timestamp and the header is not preserved.", javaType = "Long") - public static final String OVERRIDE_TIMESTAMP = "kafka.OVERRIDE_TIMESTAMP"; + public static final String OVERRIDE_TIMESTAMP = "CamelKafkaOverrideTimestamp"; @Deprecated public static final String KAFKA_DEFAULT_ENCODER = "kafka.serializer.DefaultEncoder"; @@ -65,7 +65,7 @@ public final class KafkaConstants { @Metadata(label = "producer", description = "The metadata (only configured if `recordMetadata` endpoint parameter is `true`)", javaType = "List") - public static final String KAFKA_RECORD_META = "kafka.RECORD_META"; + public static final String KAFKA_RECORD_META = "CamelKafkaRecordMeta"; @Metadata(label = "consumer", description = "Can be used for forcing manual offset commit when using Kafka consumer.", javaType = "org.apache.camel.component.kafka.consumer.KafkaManualCommit") public static final String MANUAL_COMMIT = "CamelKafkaManualCommit"; diff --git a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaConsumerFullIT.java b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaConsumerFullIT.java index 0957733834ce6..dad03bf627a41 100644 --- a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaConsumerFullIT.java +++ b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaConsumerFullIT.java @@ -160,7 +160,7 @@ public void kafkaRecordSpecificHeadersAreNotOverwritten() throws InterruptedExce to.assertIsSatisfied(3000); Map headers = to.getExchanges().get(0).getIn().getHeaders(); - assertTrue(headers.containsKey(KafkaConstants.TOPIC), "Should receive KafkaEndpoint populated kafka.TOPIC header"); + assertTrue(headers.containsKey(KafkaConstants.TOPIC), "Should receive KafkaEndpoint populated CamelKafkaTopic header"); assertEquals(TOPIC, headers.get(KafkaConstants.TOPIC), "Topic name received"); } diff --git a/components/camel-kafka/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java b/components/camel-kafka/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java index 7eadfa4c5a7c0..7156bc194e448 100644 --- a/components/camel-kafka/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java +++ b/components/camel-kafka/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java @@ -23,6 +23,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.component.kafka.KafkaComponent; +import org.apache.camel.component.kafka.KafkaConstants; import org.apache.camel.component.kafka.KafkaEndpoint; import org.apache.camel.component.kafka.KafkaProducer; import org.apache.camel.impl.DefaultCamelContext; @@ -57,8 +58,8 @@ public void init() throws Exception { when(exchange.getIn()).thenReturn(message); when(exchange.getMessage()).thenReturn(message); when(exchange.getContext()).thenReturn(context); - when(message.getHeader("kafka.PARTITION_KEY", Integer.class)).thenReturn(0); - when(message.getHeader("kafka.KEY")).thenReturn("key"); + when(message.getHeader(KafkaConstants.PARTITION_KEY, Integer.class)).thenReturn(0); + when(message.getHeader(KafkaConstants.KEY)).thenReturn("key"); } @AfterEach @@ -68,9 +69,9 @@ public void after() { @Test public void testSendOverrideTopic() throws Exception { - when(message.removeHeader("kafka.OVERRIDE_TOPIC")).thenReturn("overridden-topic"); + when(message.removeHeader(KafkaConstants.OVERRIDE_TOPIC)).thenReturn("overridden-topic"); camelProducer.process(exchange); - when(message.removeHeader("kafka.OVERRIDE_TOPIC")).thenReturn(new TextNode("overridden-topic-jackson")); + when(message.removeHeader(KafkaConstants.OVERRIDE_TOPIC)).thenReturn(new TextNode("overridden-topic-jackson")); camelProducer.process(exchange); List> records = kafkaProducer.history(); assertThat(records.get(0).topic(), Is.is("overridden-topic")); diff --git a/components/camel-mail/src/main/java/org/apache/camel/dataformat/mime/multipart/MimeMultipartDataFormat.java b/components/camel-mail/src/main/java/org/apache/camel/dataformat/mime/multipart/MimeMultipartDataFormat.java index 6827f43cff5db..a4d611dfea443 100644 --- a/components/camel-mail/src/main/java/org/apache/camel/dataformat/mime/multipart/MimeMultipartDataFormat.java +++ b/components/camel-mail/src/main/java/org/apache/camel/dataformat/mime/multipart/MimeMultipartDataFormat.java @@ -50,8 +50,10 @@ import org.apache.camel.attachment.Attachment; import org.apache.camel.attachment.AttachmentMessage; import org.apache.camel.attachment.DefaultAttachment; +import org.apache.camel.spi.HeaderFilterStrategy; import org.apache.camel.spi.annotations.Dataformat; import org.apache.camel.support.DefaultDataFormat; +import org.apache.camel.support.DefaultHeaderFilterStrategy; import org.apache.camel.support.ExchangeHelper; import org.apache.camel.support.MessageHelper; import org.apache.camel.util.IOHelper; @@ -72,11 +74,21 @@ public class MimeMultipartDataFormat extends DefaultDataFormat { private String includeHeaders; private Pattern includeHeadersPattern; private boolean binaryContent; + private final HeaderFilterStrategy headerFilterStrategy = createInboundHeaderFilterStrategy(); public void setBinaryContent(boolean binaryContent) { this.binaryContent = binaryContent; } + private static HeaderFilterStrategy createInboundHeaderFilterStrategy() { + DefaultHeaderFilterStrategy strategy = new DefaultHeaderFilterStrategy(); + // camel-4.14 DefaultHeaderFilterStrategy does not enable the Camel* in-filter by default (that + // default was introduced on a later branch), so configure it explicitly to filter the Camel* + // namespace on the inbound path, matching the mail consumer's HeaderFilterStrategy. + strategy.setInFilterStartsWith(DefaultHeaderFilterStrategy.CAMEL_FILTER_STARTS_WITH); + return strategy; + } + public void setHeadersInline(boolean headersInline) { this.headersInline = headersInline; } @@ -219,6 +231,12 @@ public Object unmarshal(Exchange exchange, InputStream stream) throws IOExceptio Object ho = headersEnum.nextElement(); if (ho instanceof Header) { Header header = (Header) ho; + // filter Camel internal headers (Camel*) instead of copying them verbatim from the external + // MIME headers, consistent with the inbound HeaderFilterStrategy applied by the mail consumer + if (headerFilterStrategy.applyFilterToExternalHeaders(header.getName(), header.getValue(), + camelMessage.getExchange())) { + continue; + } camelMessage.setHeader(header.getName(), header.getValue()); } } diff --git a/components/camel-mail/src/test/java/org/apache/camel/dataformat/mime/multipart/MimeMultipartDataFormatTest.java b/components/camel-mail/src/test/java/org/apache/camel/dataformat/mime/multipart/MimeMultipartDataFormatTest.java index f36acfed870a8..56ae3d59f2d86 100644 --- a/components/camel-mail/src/test/java/org/apache/camel/dataformat/mime/multipart/MimeMultipartDataFormatTest.java +++ b/components/camel-mail/src/test/java/org/apache/camel/dataformat/mime/multipart/MimeMultipartDataFormatTest.java @@ -406,6 +406,27 @@ public void marhsalUnmarshalInlineHeaders() throws IOException { assertEquals("also there", out.getMessage().getHeader("x-bar")); } + @Test + public void unmarshalInlineHeadersFiltersCamelInternalHeaders() { + // Camel-internal headers (Camel*, case-insensitive) present in the external MIME headers must not be + // copied onto the Camel message; ordinary application headers still pass through. This matches the + // inbound HeaderFilterStrategy applied by the mail consumer. + String mime = "CamelFoo: blocked\r\n" + + "camelBar: blocked\r\n" + + "CAMELBaz: blocked\r\n" + + "X-Normal: keep-me\r\n" + + "Content-Type: text/plain\r\n" + + "\r\n" + + "Body text"; + in.setBody(mime); + Exchange out = template.send("direct:unmarshalonlyinlineheaders", exchange); + assertNotNull(out.getMessage()); + assertEquals("keep-me", out.getMessage().getHeader("X-Normal")); + assertNull(out.getMessage().getHeader("CamelFoo")); + assertNull(out.getMessage().getHeader("camelBar")); + assertNull(out.getMessage().getHeader("CAMELBaz")); + } + @Test public void unmarshalRelated() throws IOException { in.setBody(new File("src/test/resources/multipart-related.txt")); diff --git a/components/camel-tracing/src/main/java/org/apache/camel/tracing/decorators/KafkaSpanDecorator.java b/components/camel-tracing/src/main/java/org/apache/camel/tracing/decorators/KafkaSpanDecorator.java index 2116d316f672f..74fa8f99e97f9 100644 --- a/components/camel-tracing/src/main/java/org/apache/camel/tracing/decorators/KafkaSpanDecorator.java +++ b/components/camel-tracing/src/main/java/org/apache/camel/tracing/decorators/KafkaSpanDecorator.java @@ -30,11 +30,11 @@ public class KafkaSpanDecorator extends AbstractMessagingSpanDecorator { /** * Constants copied from {@link org.apache.camel.component.kafka.KafkaConstants} */ - protected static final String PARTITION_KEY = "kafka.PARTITION_KEY"; - protected static final String PARTITION = "kafka.PARTITION"; - protected static final String KEY = "kafka.KEY"; - protected static final String OVERRIDE_TOPIC = "kafka.OVERRIDE_TOPIC"; - protected static final String OFFSET = "kafka.OFFSET"; + protected static final String PARTITION_KEY = "CamelKafkaPartitionKey"; + protected static final String PARTITION = "CamelKafkaPartition"; + protected static final String KEY = "CamelKafkaKey"; + protected static final String OVERRIDE_TOPIC = "CamelKafkaOverrideTopic"; + protected static final String OFFSET = "CamelKafkaOffset"; @Override public String getComponent() { diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfEndpointBuilderFactory.java index b8cde253b6129..77833a0f1c948 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfEndpointBuilderFactory.java @@ -2635,10 +2635,10 @@ public static class CxfHeaderNameBuilder { * * Group: common * - * @return the name of the header {@code operationName}. + * @return the name of the header {@code CxfOperationName}. */ - public String operationName() { - return "operationName"; + public String cxfOperationName() { + return "CamelCxfOperationName"; } /** * The operation namespace. @@ -2647,10 +2647,10 @@ public String operationName() { * * Group: common * - * @return the name of the header {@code operationNamespace}. + * @return the name of the header {@code CxfOperationNamespace}. */ - public String operationNamespace() { - return "operationNamespace"; + public String cxfOperationNamespace() { + return "CamelCxfOperationNamespace"; } /** * The destination override url. diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfRsEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfRsEndpointBuilderFactory.java index 6809d5d46be47..860bc11635c9d 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfRsEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfRsEndpointBuilderFactory.java @@ -2171,10 +2171,10 @@ public static class CxfRsHeaderNameBuilder { * * Group: common * - * @return the name of the header {@code operationName}. + * @return the name of the header {@code CxfOperationName}. */ - public String operationName() { - return "operationName"; + public String cxfOperationName() { + return "CamelCxfOperationName"; } /** * The authentication. diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java index dbea4bb68b02a..5a651048725dd 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java @@ -5215,10 +5215,10 @@ public static class KafkaHeaderNameBuilder { * * Group: producer * - * @return the name of the header {@code kafka.PARTITION_KEY}. + * @return the name of the header {@code KafkaPartitionKey}. */ public String kafkaPartitionKey() { - return "kafka.PARTITION_KEY"; + return "CamelKafkaPartitionKey"; } /** * The partition where the message was stored. @@ -5227,10 +5227,10 @@ public String kafkaPartitionKey() { * * Group: consumer * - * @return the name of the header {@code kafka.PARTITION}. + * @return the name of the header {@code KafkaPartition}. */ public String kafkaPartition() { - return "kafka.PARTITION"; + return "CamelKafkaPartition"; } /** * Producer: The key of the message in order to ensure that all related @@ -5242,10 +5242,10 @@ public String kafkaPartition() { * Required: true * Group: common * - * @return the name of the header {@code kafka.KEY}. + * @return the name of the header {@code KafkaKey}. */ public String kafkaKey() { - return "kafka.KEY"; + return "CamelKafkaKey"; } /** * The topic from where the message originated. @@ -5254,10 +5254,10 @@ public String kafkaKey() { * * Group: consumer * - * @return the name of the header {@code kafka.TOPIC}. + * @return the name of the header {@code KafkaTopic}. */ public String kafkaTopic() { - return "kafka.TOPIC"; + return "CamelKafkaTopic"; } /** * The topic to which send the message (override and takes precedence), @@ -5267,10 +5267,10 @@ public String kafkaTopic() { * * Group: producer * - * @return the name of the header {@code kafka.OVERRIDE_TOPIC}. + * @return the name of the header {@code KafkaOverrideTopic}. */ public String kafkaOverrideTopic() { - return "kafka.OVERRIDE_TOPIC"; + return "CamelKafkaOverrideTopic"; } /** * The offset of the message. @@ -5279,10 +5279,10 @@ public String kafkaOverrideTopic() { * * Group: consumer * - * @return the name of the header {@code kafka.OFFSET}. + * @return the name of the header {@code KafkaOffset}. */ public String kafkaOffset() { - return "kafka.OFFSET"; + return "CamelKafkaOffset"; } /** * The record headers. @@ -5291,10 +5291,10 @@ public String kafkaOffset() { * * Group: consumer * - * @return the name of the header {@code kafka.HEADERS}. + * @return the name of the header {@code KafkaHeaders}. */ public String kafkaHeaders() { - return "kafka.HEADERS"; + return "CamelKafkaHeaders"; } /** * Whether or not it's the last record before commit (only available if @@ -5304,11 +5304,10 @@ public String kafkaHeaders() { * * Group: consumer * - * @return the name of the header {@code - * kafka.LAST_RECORD_BEFORE_COMMIT}. + * @return the name of the header {@code KafkaLastRecordBeforeCommit}. */ public String kafkaLastRecordBeforeCommit() { - return "kafka.LAST_RECORD_BEFORE_COMMIT"; + return "CamelKafkaLastRecordBeforeCommit"; } /** * Indicates the last record within the current poll request (only @@ -5319,10 +5318,10 @@ public String kafkaLastRecordBeforeCommit() { * * Group: consumer * - * @return the name of the header {@code kafka.LAST_POLL_RECORD}. + * @return the name of the header {@code KafkaLastPollRecord}. */ public String kafkaLastPollRecord() { - return "kafka.LAST_POLL_RECORD"; + return "CamelKafkaLastPollRecord"; } /** * The timestamp of the message. @@ -5331,10 +5330,10 @@ public String kafkaLastPollRecord() { * * Group: consumer * - * @return the name of the header {@code kafka.TIMESTAMP}. + * @return the name of the header {@code KafkaTimestamp}. */ public String kafkaTimestamp() { - return "kafka.TIMESTAMP"; + return "CamelKafkaTimestamp"; } /** * The ProducerRecord also has an associated timestamp. If the user did @@ -5345,10 +5344,10 @@ public String kafkaTimestamp() { * * Group: producer * - * @return the name of the header {@code kafka.OVERRIDE_TIMESTAMP}. + * @return the name of the header {@code KafkaOverrideTimestamp}. */ public String kafkaOverrideTimestamp() { - return "kafka.OVERRIDE_TIMESTAMP"; + return "CamelKafkaOverrideTimestamp"; } /** * The metadata (only configured if recordMetadata endpoint parameter is @@ -5358,10 +5357,10 @@ public String kafkaOverrideTimestamp() { * * Group: producer * - * @return the name of the header {@code kafka.RECORD_META}. + * @return the name of the header {@code KafkaRecordMeta}. */ public String kafkaRecordMeta() { - return "kafka.RECORD_META"; + return "CamelKafkaRecordMeta"; } /** * Can be used for forcing manual offset commit when using Kafka diff --git a/pom.xml b/pom.xml index ac3e3e8cd7f0b..bc4de2fc267f9 100644 --- a/pom.xml +++ b/pom.xml @@ -108,9 +108,9 @@ 4.8.10-4.14.7-1 4.8.10-4.14.7-1 4.8.10-4.14.7-1 - 4.8.1.20251008 - 4.8.1.20250320 - 4.8.1.20260608 + 4.8.10-4.14.7-1 + 4.8.10-4.14.7-1 + 4.8.10-4.14.7-1 4.8.1.20260608 4.8.1.20250320 4.1.0.2 @@ -121,7 +121,7 @@ 4.8.1.20250320 4.8.1.20250320 4.8.1.20250320 - 4.8.1.20250320 + 4.8.10-4.14.7-1 4.8.1.20260608 4.8.1.20260608 4.8.1.20250320 @@ -138,17 +138,18 @@ 4.8.1.20250901 4.8.1.20250320 4.8.1.20250320 - 4.8.1.20260608 + 4.8.10-4.14.7-1 4.8.1.20260909 4.8.1.20260909 4.8.1.20260608 4.8.1.20250320 4.8.10-4.14.7-1 4.8.1.20250320 + 4.8.10-4.14.7-1 4.8.1.20260608 4.8.1.20250320 4.8.1.20260304 - 4.8.1.20260608 + 4.8.10-4.14.7-1 4.8.1.20260608 4.8.1.20250320 4.8.1.20250320 @@ -166,7 +167,7 @@ 4.8.1.20250320 4.8.1.20250320 4.8.1.20251208 - 4.8.1.20250320 + 4.8.10-4.14.7-1 4.8.1.20250320 4.8.1.20250320 4.8.1.20250320 @@ -376,6 +377,7 @@ ${camel-jaxb.tesb.version} ${camel-jms.tesb.version} ${camel-jsonpath.tesb.version} + ${camel-kafka.tesb.version} ${camel-knative-http.tesb.version} ${camel-kubernetes.tesb.version} ${camel-leveldb.tesb.version} diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JettyRecipientListCxfIssueTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JettyRecipientListCxfIssueTest.java index 842582b36b00a..c9fa542aabbb2 100644 --- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JettyRecipientListCxfIssueTest.java +++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JettyRecipientListCxfIssueTest.java @@ -57,6 +57,9 @@ void testJettyRecipientListCxf() { // send a message to jetty Exchange out = template.request("http://0.0.0.0:{{RecipientListCxfTest.port3}}/myapp", exchange -> { + // Use the non-Camel-prefixed carrier header convention so it survives + // the HTTP transport boundary; the receiver maps it to the renamed + // CxfConstants.OPERATION_NAME value before any cxf: call. exchange.getIn().setHeader("operationName", "greetMe"); exchange.getIn().setBody(request); }); diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsToCxfInOutTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsToCxfInOutTest.java index 585bc1060b713..73358bc6b1773 100644 --- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsToCxfInOutTest.java +++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsToCxfInOutTest.java @@ -17,7 +17,6 @@ package org.apache.camel.itest.greeter; import org.apache.camel.ProducerTemplate; -import org.apache.camel.component.cxf.common.message.CxfConstants; import org.apache.camel.itest.utils.extensions.JmsServiceExtension; import org.apache.camel.test.AvailablePortFinder; import org.apache.camel.test.spring.junit5.CamelSpringTest; @@ -49,12 +48,16 @@ public class JmsToCxfInOutTest { void testJmsToCxfInOut() { assertNotNull(template); - String out = template.requestBodyAndHeader("jms:queue:bridge.cxf", "Willem", CxfConstants.OPERATION_NAME, "greetMe", + // The CXF operation header value now begins with "Camel" and is therefore + // filtered by JmsHeaderFilterStrategy at the transport boundary. Send the + // operation as a non-Camel-prefixed carrier header; the route maps it to + // CxfConstants.OPERATION_NAME between the JMS from and the cxf: to. + String out = template.requestBodyAndHeader("jms:queue:bridge.cxf", "Willem", "operationName", "greetMe", String.class); assertEquals("Hello Willem", out); // call for the other operation - out = template.requestBodyAndHeader("jms:queue:bridge.cxf", new Object[0], CxfConstants.OPERATION_NAME, "sayHi", + out = template.requestBodyAndHeader("jms:queue:bridge.cxf", new Object[0], "operationName", "sayHi", String.class); assertEquals("Bonjour", out); } diff --git a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/JmsToCxfInOutTest-context.xml b/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/JmsToCxfInOutTest-context.xml index 72c51505e7a40..e392f778c3bbe 100644 --- a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/JmsToCxfInOutTest-context.xml +++ b/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/JmsToCxfInOutTest-context.xml @@ -68,6 +68,14 @@ + + + ${header.operationName} +