Andrea Cosentino created CAMEL-24606:
----------------------------------------

             Summary: camel-google-firestore: the realtime change type header 
is undocumented
                 Key: CAMEL-24606
                 URL: https://issues.apache.org/jira/browse/CAMEL-24606
             Project: Camel
          Issue Type: Bug
          Components: camel-google
            Reporter: Andrea Cosentino
            Assignee: Andrea Cosentino


The realtime consumer sets the document change type as a raw string literal:

{code:java}
if (changeType != null) {
    message.setHeader("CamelGoogleFirestoreChangeType", changeType.name());
}
{code}

Every other header the component reads or writes is a {{@Metadata}}-annotated 
constant in
{{GoogleFirestoreConstants}}, so it ends up in the component metadata. This one 
is not: the generated
{{google-firestore.json}} documents 16 headers and this is not among them, so 
the only header that is
specific to the realtime mode - the one telling the route whether a document 
was ADDED, MODIFIED or
REMOVED - is invisible in the catalog, in the component documentation and in 
the endpoint DSL header
accessors.

The literal has been there since the component was contributed in CAMEL-23020.

Add the missing constant and use it. The header name itself must NOT change: it 
is already emitted by the
released component, so {{CamelGoogleFirestoreChangeType}} stays exactly as it 
is and only the metadata is
added. No behaviour change, no upgrade note.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to