gabriel-farache commented on issue #1968: URL: https://github.com/apache/incubator-kie-issues/issues/1968#issuecomment-2909075334
In the CloudEvent spec I see nothing against setting custom headers: > Many protocols support the ability for senders to include additional metadata, for example as HTTP headers. While a CloudEvents receiver is not mandated to process and pass them along, it is RECOMMENDED that they do so via some mechanism that makes it clear they are non-CloudEvents metadata. from https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#defining-extensions For kafka they it is even stated that any metadata must be in the header of the kafka message https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/kafka-protocol-binding.md#323-metadata-headers So I guess `api/kogito-api/src/main/java/org/kie/kogito/event/DataEvent.java` can be extended to add a `getHeaders` method and that `api/kogito-events-core/src/main/java/org/kie/kogito/event/impl/CloudEventWrapDataEvent.java` wil have to implement the new method. And of course, every implementations of `api/kogito-events-core/src/main/java/org/kie/kogito/event/EventReceiverFactory.java` will have to extract the headers when possible -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
