This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 14ecd5ede072 camel-alibaba-mns: the operation and topicName headers
the producer reads are documented nowhere (#30048)
14ecd5ede072 is described below
commit 14ecd5ede07234a4cea07bd92997fdeea2f20ca3
Author: dhairya05 <[email protected]>
AuthorDate: Mon Nov 16 01:41:16 2026 +0530
camel-alibaba-mns: the operation and topicName headers the producer reads
are documented nowhere (#30048)
---
.../camel/catalog/components/alibaba-mns.json | 10 ++++----
.../camel/component/alibaba/mns/alibaba-mns.json | 10 ++++----
.../camel/component/alibaba/mns/MNSUtils.java | 4 ++--
.../alibaba/mns/constants/MNSHeaders.java | 12 ++++++++++
.../alibaba/mns/constants/MNSProperties.java | 6 +++--
.../endpoint/dsl/MNSEndpointBuilderFactory.java | 28 ++++++++++++++++++++++
6 files changed, 58 insertions(+), 12 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-mns.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-mns.json
index ed49e68a840b..9b1319c25668 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-mns.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-mns.json
@@ -37,10 +37,12 @@
"CamelAlibabaMnsDelaySeconds": { "index": 3, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Integer", "deprecated": false, "autowired": false, "secret":
false, "description": "Delay in seconds before the message becomes visible",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#DELAY_SECONDS" },
"CamelAlibabaMnsPriority": { "index": 4, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"Integer", "deprecated": false, "autowired": false, "secret": false,
"description": "Message priority", "constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#PRIORITY" },
"CamelAlibabaMnsMessageTag": { "index": 5, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "Message tag for topic publish operations", "constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#MESSAGE_TAG" },
- "CamelAlibabaMnsDequeueCount": { "index": 6, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "Integer", "deprecated": false, "autowired": false, "secret":
false, "description": "Number of times the message has been dequeued",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#DEQUEUE_COUNT" },
- "CamelAlibabaMnsEnqueueTime": { "index": 7, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "java.util.Date", "deprecated": false, "autowired": false,
"secret": false, "description": "Time when the message was enqueued",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#ENQUEUE_TIME" },
- "CamelAlibabaMnsNextVisibleTime": { "index": 8, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "java.util.Date", "deprecated": false, "autowired": false,
"secret": false, "description": "Next time the message becomes visible",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#NEXT_VISIBLE_TIME"
},
- "CamelAlibabaMnsFirstDequeueTime": { "index": 9, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "java.util.Date", "deprecated": false, "autowired": false,
"secret": false, "description": "Time when the message was first dequeued",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#FIRST_DEQUEUE_TIME"
}
+ "CamelAlibabaMnsOperation": { "index": 6, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The operation to invoke, overriding the operation the endpoint
resolves. The exchange property of the same name takes precedence over this
header.", "constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#OPERATION" },
+ "CamelAlibabaMnsTopicName": { "index": 7, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The name of the topic to publish to, overriding the one the
endpoint resolves. The exchange property of the same name takes precedence over
this header.", "constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#TOPIC_NAME" },
+ "CamelAlibabaMnsDequeueCount": { "index": 8, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "Integer", "deprecated": false, "autowired": false, "secret":
false, "description": "Number of times the message has been dequeued",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#DEQUEUE_COUNT" },
+ "CamelAlibabaMnsEnqueueTime": { "index": 9, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "java.util.Date", "deprecated": false, "autowired": false,
"secret": false, "description": "Time when the message was enqueued",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#ENQUEUE_TIME" },
+ "CamelAlibabaMnsNextVisibleTime": { "index": 10, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "java.util.Date", "deprecated": false, "autowired": false,
"secret": false, "description": "Next time the message becomes visible",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#NEXT_VISIBLE_TIME"
},
+ "CamelAlibabaMnsFirstDequeueTime": { "index": 11, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "java.util.Date", "deprecated": false, "autowired": false,
"secret": false, "description": "Time when the message was first dequeued",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#FIRST_DEQUEUE_TIME"
}
},
"bodyTypes": {
"consumerOut": { "carriers": [ "text", "bytes" ], "description": "The body
of the MNS message: a String when it is UTF-8 text, else a byte array, such as
for the bytes of a file a producer sent, with the message id, the receipt
handle and the dequeue count in headers. Binary data that is valid UTF-8
arrives as a String, so getBody(byte[].class) is the reliable way to get the
bytes of a message" },
diff --git
a/components/camel-alibaba/camel-alibaba-mns/src/generated/resources/META-INF/org/apache/camel/component/alibaba/mns/alibaba-mns.json
b/components/camel-alibaba/camel-alibaba-mns/src/generated/resources/META-INF/org/apache/camel/component/alibaba/mns/alibaba-mns.json
index ed49e68a840b..9b1319c25668 100644
---
a/components/camel-alibaba/camel-alibaba-mns/src/generated/resources/META-INF/org/apache/camel/component/alibaba/mns/alibaba-mns.json
+++
b/components/camel-alibaba/camel-alibaba-mns/src/generated/resources/META-INF/org/apache/camel/component/alibaba/mns/alibaba-mns.json
@@ -37,10 +37,12 @@
"CamelAlibabaMnsDelaySeconds": { "index": 3, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Integer", "deprecated": false, "autowired": false, "secret":
false, "description": "Delay in seconds before the message becomes visible",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#DELAY_SECONDS" },
"CamelAlibabaMnsPriority": { "index": 4, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"Integer", "deprecated": false, "autowired": false, "secret": false,
"description": "Message priority", "constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#PRIORITY" },
"CamelAlibabaMnsMessageTag": { "index": 5, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "Message tag for topic publish operations", "constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#MESSAGE_TAG" },
- "CamelAlibabaMnsDequeueCount": { "index": 6, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "Integer", "deprecated": false, "autowired": false, "secret":
false, "description": "Number of times the message has been dequeued",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#DEQUEUE_COUNT" },
- "CamelAlibabaMnsEnqueueTime": { "index": 7, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "java.util.Date", "deprecated": false, "autowired": false,
"secret": false, "description": "Time when the message was enqueued",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#ENQUEUE_TIME" },
- "CamelAlibabaMnsNextVisibleTime": { "index": 8, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "java.util.Date", "deprecated": false, "autowired": false,
"secret": false, "description": "Next time the message becomes visible",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#NEXT_VISIBLE_TIME"
},
- "CamelAlibabaMnsFirstDequeueTime": { "index": 9, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "java.util.Date", "deprecated": false, "autowired": false,
"secret": false, "description": "Time when the message was first dequeued",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#FIRST_DEQUEUE_TIME"
}
+ "CamelAlibabaMnsOperation": { "index": 6, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The operation to invoke, overriding the operation the endpoint
resolves. The exchange property of the same name takes precedence over this
header.", "constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#OPERATION" },
+ "CamelAlibabaMnsTopicName": { "index": 7, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The name of the topic to publish to, overriding the one the
endpoint resolves. The exchange property of the same name takes precedence over
this header.", "constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#TOPIC_NAME" },
+ "CamelAlibabaMnsDequeueCount": { "index": 8, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "Integer", "deprecated": false, "autowired": false, "secret":
false, "description": "Number of times the message has been dequeued",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#DEQUEUE_COUNT" },
+ "CamelAlibabaMnsEnqueueTime": { "index": 9, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "java.util.Date", "deprecated": false, "autowired": false,
"secret": false, "description": "Time when the message was enqueued",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#ENQUEUE_TIME" },
+ "CamelAlibabaMnsNextVisibleTime": { "index": 10, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "java.util.Date", "deprecated": false, "autowired": false,
"secret": false, "description": "Next time the message becomes visible",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#NEXT_VISIBLE_TIME"
},
+ "CamelAlibabaMnsFirstDequeueTime": { "index": 11, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "java.util.Date", "deprecated": false, "autowired": false,
"secret": false, "description": "Time when the message was first dequeued",
"constantName":
"org.apache.camel.component.alibaba.mns.constants.MNSHeaders#FIRST_DEQUEUE_TIME"
}
},
"bodyTypes": {
"consumerOut": { "carriers": [ "text", "bytes" ], "description": "The body
of the MNS message: a String when it is UTF-8 text, else a byte array, such as
for the bytes of a file a producer sent, with the message id, the receipt
handle and the dequeue count in headers. Binary data that is valid UTF-8
arrives as a String, so getBody(byte[].class) is the reliable way to get the
bytes of a message" },
diff --git
a/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/MNSUtils.java
b/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/MNSUtils.java
index 9d0b334ecdaa..8174f9d16a48 100644
---
a/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/MNSUtils.java
+++
b/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/MNSUtils.java
@@ -83,7 +83,7 @@ public final class MNSUtils {
public static String resolveOperation(MNSEndpoint endpoint, Exchange
exchange) {
String operation = exchange.getProperty(MNSProperties.OPERATION,
String.class);
if (ObjectHelper.isEmpty(operation)) {
- operation = exchange.getIn().getHeader(MNSProperties.OPERATION,
String.class);
+ operation = exchange.getIn().getHeader(MNSHeaders.OPERATION,
String.class);
}
if (ObjectHelper.isEmpty(operation)) {
operation = endpoint.resolveOperation();
@@ -102,7 +102,7 @@ public final class MNSUtils {
public static String resolveTopicName(MNSEndpoint endpoint, Exchange
exchange) {
String topicName = exchange.getProperty(MNSProperties.TOPIC_NAME,
String.class);
if (ObjectHelper.isEmpty(topicName)) {
- topicName = exchange.getIn().getHeader(MNSProperties.TOPIC_NAME,
String.class);
+ topicName = exchange.getIn().getHeader(MNSHeaders.TOPIC_NAME,
String.class);
}
if (ObjectHelper.isEmpty(topicName)) {
topicName = endpoint.resolveTopicName();
diff --git
a/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/constants/MNSHeaders.java
b/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/constants/MNSHeaders.java
index 1e1ec9948c53..29adcd3aaebb 100644
---
a/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/constants/MNSHeaders.java
+++
b/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/constants/MNSHeaders.java
@@ -38,6 +38,18 @@ public final class MNSHeaders {
@Metadata(label = "producer", description = "Message tag for topic publish
operations", javaType = "String")
public static final String MESSAGE_TAG = "CamelAlibabaMnsMessageTag";
+ @Metadata(label = "producer", description = "The operation to invoke,
overriding the operation the endpoint"
+ + " resolves. The exchange
property of the same name takes precedence"
+ + " over this header.",
+ javaType = "String")
+ public static final String OPERATION = "CamelAlibabaMnsOperation";
+
+ @Metadata(label = "producer", description = "The name of the topic to
publish to, overriding the one the endpoint"
+ + " resolves. The exchange
property of the same name takes precedence"
+ + " over this header.",
+ javaType = "String")
+ public static final String TOPIC_NAME = "CamelAlibabaMnsTopicName";
+
@Metadata(label = "consumer", description = "Number of times the message
has been dequeued", javaType = "Integer")
public static final String DEQUEUE_COUNT = "CamelAlibabaMnsDequeueCount";
diff --git
a/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/constants/MNSProperties.java
b/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/constants/MNSProperties.java
index 7337c68fedcf..79050b494782 100644
---
a/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/constants/MNSProperties.java
+++
b/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/constants/MNSProperties.java
@@ -18,9 +18,11 @@ package org.apache.camel.component.alibaba.mns.constants;
public final class MNSProperties {
- public static final String OPERATION = "CamelAlibabaMnsOperation";
+ /** Also read as a message header; see {@link MNSHeaders#OPERATION}. */
+ public static final String OPERATION = MNSHeaders.OPERATION;
public static final String QUEUE_NAME = "CamelAlibabaMnsQueueName";
- public static final String TOPIC_NAME = "CamelAlibabaMnsTopicName";
+ /** Also read as a message header; see {@link MNSHeaders#TOPIC_NAME}. */
+ public static final String TOPIC_NAME = MNSHeaders.TOPIC_NAME;
public static final String REQUEST_ID = "CamelAlibabaMnsRequestId";
private MNSProperties() {
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MNSEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MNSEndpointBuilderFactory.java
index 554e7ab73088..925a80752910 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MNSEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MNSEndpointBuilderFactory.java
@@ -1566,6 +1566,34 @@ public interface MNSEndpointBuilderFactory {
public String alibabaMnsMessageTag() {
return "CamelAlibabaMnsMessageTag";
}
+ /**
+ * The operation to invoke, overriding the operation the endpoint
+ * resolves. The exchange property of the same name takes precedence
+ * over this header.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AlibabaMnsOperation}.
+ */
+ public String alibabaMnsOperation() {
+ return "CamelAlibabaMnsOperation";
+ }
+ /**
+ * The name of the topic to publish to, overriding the one the endpoint
+ * resolves. The exchange property of the same name takes precedence
+ * over this header.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AlibabaMnsTopicName}.
+ */
+ public String alibabaMnsTopicName() {
+ return "CamelAlibabaMnsTopicName";
+ }
/**
* Number of times the message has been dequeued.
*