strimzi-kafka-bridge icon indicating copy to clipboard operation
strimzi-kafka-bridge copied to clipboard

Kafka 0.11 message headers

Open tombentley opened this issue 7 years ago • 4 comments

Kafka 0.11.0.0 will add support for message headers (https://cwiki.apache.org/confluence/display/KAFKA/KIP-82+-+Add+Record+Headers). Once this feature has landed the MessageConverters could map Kafka message headers to AMQP message annotations.

tombentley avatar Jun 09 '17 08:06 tombentley

AMQP protocol has different things that could map well into Kafka headers like system properties, custom properties, message annotations and so on. I agree with you but we should figure out if it makes sense to map only some of them or all of them assigning a meaningful name to the header with the related value.

ppatierno avatar Jun 09 '17 08:06 ppatierno

At the very least having some indication of the structure of the payload would be helpful.

grs avatar Jun 09 '17 09:06 grs

@grs are you speaking about having a field in the header which provides information about the payload (i.e. if it's XML, JSON, ..) like a "content-type" field ?

ppatierno avatar Jun 09 '17 12:06 ppatierno

@ppatierno @grs I would think that if the original AMQP message was binary (data sections) then we would simply copy the content-type from the properties into some appropriate kafka header... where we have performed some translations from an amqp structured message (like a map), then we would add a content type. It seems to me that if Kafka messages have headers then we should be putting all the non body data into headers (annotations, properties, [amqp] headers) and the only thing we should put in the Kafka message body is the (potentially transformed) AMQP message body

rgodfrey avatar Jun 09 '17 12:06 rgodfrey

Closing this one because the bridge doesn't support AMQP 1.0 protocol anymore.

ppatierno avatar Nov 14 '22 15:11 ppatierno