Kafka headers are being overwritten by Kafka Source

252 Views Asked by At

I want to have Kafka message (cloud event) to be passed through Kafka Source -> Broker -> ASP.NET core service with headers from initial Kafka message. Right now I can put message with body, headers and on Kafka, it's consumed by Kafka Source, but headers from Kafka message are replaced somewhere between Kafka and my service. Initial headers:

correlationid = {guid}
ce-specversion = 1.0
ce-id = {guid}
ce-source = {differentRelativeUriThanBelow}
ce-type = {com.company.product.request.amqp.asynchronous:v1}
Content-Type = application/cloudevents

Received in service:

correlationid =
ce-specversion = 1.0
ce-id = partition:0/offset:52
ce-source = /apis/v1/namespaces/myNamespace/kafkasources/kafka-source-myNamespace#myKafkaTopic
ce-type = dev.knative.kafka.event
Content-Type = application/cloudevents

Any way I can prevent this behaviour or at least configure it in a way so my headers are included in HTTP request received by the service?

0

There are 0 best solutions below