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 7bfb1ac73ecf camel-camunda: CamelCamundaJobKey is set by the consumer
but documented producer-only (#29977)
7bfb1ac73ecf is described below
commit 7bfb1ac73ecf4045e5efeac8579136880dec422f
Author: dhairya05 <[email protected]>
AuthorDate: Sun Nov 15 12:52:22 2026 +0530
camel-camunda: CamelCamundaJobKey is set by the consumer but documented
producer-only (#29977)
The job worker consumer puts the key of every job it activates on the
exchange:
exchange.getMessage().setHeader(CamundaConstants.JOB_KEY, job.getKey());
and JobProcessor, which serves the completeJob, failJob, throwError and
updateJobRetries producer operations, reads it back when the body does
not carry a job key of its own:
Long headerJobKey =
exchange.getMessage().getHeader(CamundaConstants.JOB_KEY, Long.class);
...
} else if (headerJobKey != null) {
message = buildFromHeaders(exchange, headerJobKey);
}
So the header is what joins the two halves of the usual route - worker
consumer, processing, completeJob producer - and label="producer" with
"Job key for the worker job" documents only the half that reads it.
Drop the label so it lands in common, and say what it holds in each
direction.
---
.../resources/org/apache/camel/catalog/components/camunda.json | 2 +-
.../META-INF/org/apache/camel/component/camunda/camunda.json | 2 +-
.../java/org/apache/camel/component/camunda/CamundaConstants.java | 4 +++-
.../camel/builder/endpoint/dsl/CamundaEndpointBuilderFactory.java | 5 +++--
4 files changed, 8 insertions(+), 5 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/camunda.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/camunda.json
index ae3caa08c24f..000dc801c183 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/camunda.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/camunda.json
@@ -36,7 +36,7 @@
"region": { "index": 9, "kind": "property", "displayName": "Region",
"group": "security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "bru-2", "description": "Camunda SaaS region
(default: bru-2)." }
},
"headers": {
- "CamelCamundaJobKey": { "index": 0, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"long", "deprecated": false, "autowired": false, "secret": false,
"description": "Job key for the worker job", "constantName":
"org.apache.camel.component.camunda.CamundaConstants#JOB_KEY" },
+ "CamelCamundaJobKey": { "index": 0, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "long",
"deprecated": false, "autowired": false, "secret": false, "description":
"(consumer) Job key of the worker job that was activated. (producer) Job key of
the job to act on, when the body does not carry one.", "constantName":
"org.apache.camel.component.camunda.CamundaConstants#JOB_KEY" },
"CamelCamundaResourceName": { "index": 1, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "Resource name for deploy operation", "constantName":
"org.apache.camel.component.camunda.CamundaConstants#RESOURCE_NAME" },
"CamelCamundaIsSuccess": { "index": 2, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"description": "Indicates if the operation was successful", "constantName":
"org.apache.camel.component.camunda.CamundaConstants#IS_SUCCESS" },
"CamelCamundaErrorMessage": { "index": 3, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "Error message if operation failed", "constantName":
"org.apache.camel.component.camunda.CamundaConstants#ERROR_MESSAGE" },
diff --git
a/components/camel-camunda/src/generated/resources/META-INF/org/apache/camel/component/camunda/camunda.json
b/components/camel-camunda/src/generated/resources/META-INF/org/apache/camel/component/camunda/camunda.json
index ae3caa08c24f..000dc801c183 100644
---
a/components/camel-camunda/src/generated/resources/META-INF/org/apache/camel/component/camunda/camunda.json
+++
b/components/camel-camunda/src/generated/resources/META-INF/org/apache/camel/component/camunda/camunda.json
@@ -36,7 +36,7 @@
"region": { "index": 9, "kind": "property", "displayName": "Region",
"group": "security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "bru-2", "description": "Camunda SaaS region
(default: bru-2)." }
},
"headers": {
- "CamelCamundaJobKey": { "index": 0, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"long", "deprecated": false, "autowired": false, "secret": false,
"description": "Job key for the worker job", "constantName":
"org.apache.camel.component.camunda.CamundaConstants#JOB_KEY" },
+ "CamelCamundaJobKey": { "index": 0, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "long",
"deprecated": false, "autowired": false, "secret": false, "description":
"(consumer) Job key of the worker job that was activated. (producer) Job key of
the job to act on, when the body does not carry one.", "constantName":
"org.apache.camel.component.camunda.CamundaConstants#JOB_KEY" },
"CamelCamundaResourceName": { "index": 1, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "Resource name for deploy operation", "constantName":
"org.apache.camel.component.camunda.CamundaConstants#RESOURCE_NAME" },
"CamelCamundaIsSuccess": { "index": 2, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"description": "Indicates if the operation was successful", "constantName":
"org.apache.camel.component.camunda.CamundaConstants#IS_SUCCESS" },
"CamelCamundaErrorMessage": { "index": 3, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "Error message if operation failed", "constantName":
"org.apache.camel.component.camunda.CamundaConstants#ERROR_MESSAGE" },
diff --git
a/components/camel-camunda/src/main/java/org/apache/camel/component/camunda/CamundaConstants.java
b/components/camel-camunda/src/main/java/org/apache/camel/component/camunda/CamundaConstants.java
index 04726ad98c2e..ca992064c4e7 100644
---
a/components/camel-camunda/src/main/java/org/apache/camel/component/camunda/CamundaConstants.java
+++
b/components/camel-camunda/src/main/java/org/apache/camel/component/camunda/CamundaConstants.java
@@ -22,7 +22,9 @@ public final class CamundaConstants {
public static final String HEADER_PREFIX = "CamelCamunda";
- @Metadata(label = "producer", description = "Job key for the worker job",
javaType = "long")
+ @Metadata(description = "(consumer) Job key of the worker job that was
activated."
+ + " (producer) Job key of the job to act on, when
the body does not carry one.",
+ javaType = "long")
public static final String JOB_KEY = HEADER_PREFIX + "JobKey";
@Metadata(label = "producer", description = "Resource name for deploy
operation", javaType = "String")
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CamundaEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CamundaEndpointBuilderFactory.java
index 174b5fbe283f..15e235ca8442 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CamundaEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CamundaEndpointBuilderFactory.java
@@ -477,11 +477,12 @@ public interface CamundaEndpointBuilderFactory {
public static final CamundaHeaderNameBuilder INSTANCE = new
CamundaHeaderNameBuilder();
/**
- * Job key for the worker job.
+ * (consumer) Job key of the worker job that was activated. (producer)
+ * Job key of the job to act on, when the body does not carry one.
*
* The option is a: {@code long} type.
*
- * Group: producer
+ * Group: common
*
* @return the name of the header {@code CamundaJobKey}.
*/