Andrea Cosentino created CAMEL-24384:
----------------------------------------

             Summary: camel-azure-eventgrid: the dataVersion header is read but 
never applied to the published CloudEvent
                 Key: CAMEL-24384
                 URL: https://issues.apache.org/jira/browse/CAMEL-24384
             Project: Camel
          Issue Type: Bug
          Components: camel-azure
            Reporter: Andrea Cosentino
            Assignee: Andrea Cosentino
             Fix For: 4.22.0


h3. Problem

{{EventGridProducer.createCloudEvent}} reads a {{dataVersion}} header then 
never uses it:
{code:java}
String dataVersion = message.getHeader(EventGridConstants.DATA_VERSION, 
String.class);
...
CloudEvent event = new CloudEvent("/camel", eventType, 
BinaryData.fromObject(data), null, null);
{code}
The producer publishes CloudEvents, which have no {{dataVersion}} field (that 
belongs to the legacy EventGridEvent schema), so the advertised 
{{DATA_VERSION}} header can never take effect.

h3. Fix

Remove the dead read (and the {{DATA_VERSION}} constant if advertised as a 
header), or document it as not applicable to the CloudEvent publisher. Low 
severity. Affects main (4.22.0-SNAPSHOT).



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

Reply via email to