This is an automated email from the ASF dual-hosted git repository.
oscerd 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 e8365362684e CAMEL-24606: camel-google-firestore - document the
realtime change type header (#26078)
e8365362684e is described below
commit e8365362684e9be2f26839b77ade635c81ad4519
Author: Andrea Cosentino <[email protected]>
AuthorDate: Thu Sep 3 18:28:09 2026 +0200
CAMEL-24606: camel-google-firestore - document the realtime change type
header (#26078)
The realtime consumer set the change type with a raw string literal, so
unlike every
other header of the component it was not an @Metadata-annotated constant
and never
reached the component metadata: the only header specific to the realtime
mode was
missing from the catalog, from the documentation and from the endpoint-DSL
header
accessors.
The header name is deliberately unchanged, since the released component
already emits
CamelGoogleFirestoreChangeType and routes read it; only the metadata is
added, so there
is no behaviour change.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
---
.../apache/camel/catalog/components/google-firestore.json | 5 +++--
.../camel/component/google/firestore/google-firestore.json | 5 +++--
.../google/firestore/GoogleFirestoreConstants.java | 6 ++++++
.../component/google/firestore/GoogleFirestoreConsumer.java | 2 +-
.../endpoint/dsl/GoogleFirestoreEndpointBuilderFactory.java | 13 +++++++++++++
5 files changed, 26 insertions(+), 5 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-firestore.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-firestore.json
index 05587d088f63..4857354c7e10 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-firestore.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-firestore.json
@@ -54,8 +54,9 @@
"CamelGoogleFirestoreResponseCreateTime": { "index": 11, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "com.google.cloud.Timestamp", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
document create time.", "constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#RESPONSE_CREATE_TIME"
},
"CamelGoogleFirestoreResponseUpdateTime": { "index": 12, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "com.google.cloud.Timestamp", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
document update time.", "constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#RESPONSE_UPDATE_TIME"
},
"CamelGoogleFirestoreResponseReadTime": { "index": 13, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "com.google.cloud.Timestamp", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
document read time.", "constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#RESPONSE_READ_TIME"
},
- "CamelGoogleFirestoreMerge": { "index": 14, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "defaultValue": "false", "description": "When true,
merge the data with existing document data instead of overwriting.",
"constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#MERGE" },
- "CamelGoogleFirestoreMergeFields": { "index": 15, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "java.util.List<String>", "deprecated": false, "deprecationNote":
"", "autowired": false, "secret": false, "description": "List of field paths to
merge when using merge option.", "constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#MERGE_FIELDS"
}
+ "CamelGoogleFirestoreChangeType": { "index": 14, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "The type of change reported by the
realtime listener: ADDED, MODIFIED or REMOVED. Only set when realtimeUpdates is
enabled.", "constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#CHANGE_TYPE"
},
+ "CamelGoogleFirestoreMerge": { "index": 15, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "defaultValue": "false", "description": "When true,
merge the data with existing document data instead of overwriting.",
"constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#MERGE" },
+ "CamelGoogleFirestoreMergeFields": { "index": 16, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "java.util.List<String>", "deprecated": false, "deprecationNote":
"", "autowired": false, "secret": false, "description": "List of field paths to
merge when using merge option.", "constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#MERGE_FIELDS"
}
},
"properties": {
"collectionName": { "index": 0, "kind": "path", "displayName": "Collection
Name", "group": "common", "label": "common", "required": true, "type":
"string", "javaType": "java.lang.String", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.google.firestore.GoogleFirestoreConfiguration",
"configurationField": "configuration", "description": "The collection name to
use" },
diff --git
a/components/camel-google/camel-google-firestore/src/generated/resources/META-INF/org/apache/camel/component/google/firestore/google-firestore.json
b/components/camel-google/camel-google-firestore/src/generated/resources/META-INF/org/apache/camel/component/google/firestore/google-firestore.json
index 05587d088f63..4857354c7e10 100644
---
a/components/camel-google/camel-google-firestore/src/generated/resources/META-INF/org/apache/camel/component/google/firestore/google-firestore.json
+++
b/components/camel-google/camel-google-firestore/src/generated/resources/META-INF/org/apache/camel/component/google/firestore/google-firestore.json
@@ -54,8 +54,9 @@
"CamelGoogleFirestoreResponseCreateTime": { "index": 11, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "com.google.cloud.Timestamp", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
document create time.", "constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#RESPONSE_CREATE_TIME"
},
"CamelGoogleFirestoreResponseUpdateTime": { "index": 12, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "com.google.cloud.Timestamp", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
document update time.", "constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#RESPONSE_UPDATE_TIME"
},
"CamelGoogleFirestoreResponseReadTime": { "index": 13, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "com.google.cloud.Timestamp", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
document read time.", "constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#RESPONSE_READ_TIME"
},
- "CamelGoogleFirestoreMerge": { "index": 14, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "defaultValue": "false", "description": "When true,
merge the data with existing document data instead of overwriting.",
"constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#MERGE" },
- "CamelGoogleFirestoreMergeFields": { "index": 15, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "java.util.List<String>", "deprecated": false, "deprecationNote":
"", "autowired": false, "secret": false, "description": "List of field paths to
merge when using merge option.", "constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#MERGE_FIELDS"
}
+ "CamelGoogleFirestoreChangeType": { "index": 14, "kind": "header",
"displayName": "", "group": "consumer", "label": "consumer", "required": false,
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "The type of change reported by the
realtime listener: ADDED, MODIFIED or REMOVED. Only set when realtimeUpdates is
enabled.", "constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#CHANGE_TYPE"
},
+ "CamelGoogleFirestoreMerge": { "index": 15, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "defaultValue": "false", "description": "When true,
merge the data with existing document data instead of overwriting.",
"constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#MERGE" },
+ "CamelGoogleFirestoreMergeFields": { "index": 16, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "java.util.List<String>", "deprecated": false, "deprecationNote":
"", "autowired": false, "secret": false, "description": "List of field paths to
merge when using merge option.", "constantName":
"org.apache.camel.component.google.firestore.GoogleFirestoreConstants#MERGE_FIELDS"
}
},
"properties": {
"collectionName": { "index": 0, "kind": "path", "displayName": "Collection
Name", "group": "common", "label": "common", "required": true, "type":
"string", "javaType": "java.lang.String", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.google.firestore.GoogleFirestoreConfiguration",
"configurationField": "configuration", "description": "The collection name to
use" },
diff --git
a/components/camel-google/camel-google-firestore/src/main/java/org/apache/camel/component/google/firestore/GoogleFirestoreConstants.java
b/components/camel-google/camel-google-firestore/src/main/java/org/apache/camel/component/google/firestore/GoogleFirestoreConstants.java
index 904409f5ef09..bd56c9437b12 100644
---
a/components/camel-google/camel-google-firestore/src/main/java/org/apache/camel/component/google/firestore/GoogleFirestoreConstants.java
+++
b/components/camel-google/camel-google-firestore/src/main/java/org/apache/camel/component/google/firestore/GoogleFirestoreConstants.java
@@ -73,6 +73,12 @@ public final class GoogleFirestoreConstants {
@Metadata(label = "consumer", description = "The document read time.",
javaType = "com.google.cloud.Timestamp")
public static final String RESPONSE_READ_TIME =
"CamelGoogleFirestoreResponseReadTime";
+ @Metadata(label = "consumer",
+ description = "The type of change reported by the realtime
listener: ADDED, MODIFIED or REMOVED."
+ + " Only set when realtimeUpdates is enabled.",
+ javaType = "String")
+ public static final String CHANGE_TYPE = "CamelGoogleFirestoreChangeType";
+
// Set/update options
@Metadata(label = "producer", description = "When true, merge the data
with existing document data instead of overwriting.",
javaType = "Boolean", defaultValue = "false")
diff --git
a/components/camel-google/camel-google-firestore/src/main/java/org/apache/camel/component/google/firestore/GoogleFirestoreConsumer.java
b/components/camel-google/camel-google-firestore/src/main/java/org/apache/camel/component/google/firestore/GoogleFirestoreConsumer.java
index 33913bb08edb..f017b58f4a5b 100644
---
a/components/camel-google/camel-google-firestore/src/main/java/org/apache/camel/component/google/firestore/GoogleFirestoreConsumer.java
+++
b/components/camel-google/camel-google-firestore/src/main/java/org/apache/camel/component/google/firestore/GoogleFirestoreConsumer.java
@@ -212,7 +212,7 @@ public class GoogleFirestoreConsumer extends
ScheduledBatchPollingConsumer {
message.setHeader(GoogleFirestoreConstants.RESPONSE_READ_TIME,
document.getReadTime());
if (changeType != null) {
- message.setHeader("CamelGoogleFirestoreChangeType",
changeType.name());
+ message.setHeader(GoogleFirestoreConstants.CHANGE_TYPE,
changeType.name());
}
return exchange;
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleFirestoreEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleFirestoreEndpointBuilderFactory.java
index a77763ded14e..4c7dc05d2425 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleFirestoreEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleFirestoreEndpointBuilderFactory.java
@@ -1384,6 +1384,19 @@ public interface GoogleFirestoreEndpointBuilderFactory {
public String googleFirestoreResponseReadTime() {
return "CamelGoogleFirestoreResponseReadTime";
}
+ /**
+ * The type of change reported by the realtime listener: ADDED,
MODIFIED
+ * or REMOVED. Only set when realtimeUpdates is enabled.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: consumer
+ *
+ * @return the name of the header {@code GoogleFirestoreChangeType}.
+ */
+ public String googleFirestoreChangeType() {
+ return "CamelGoogleFirestoreChangeType";
+ }
/**
* When true, merge the data with existing document data instead of
* overwriting.