swift-server / swift-kafka-client

Apache License 2.0
83 stars 23 forks source link

Add headers to `KafkaAcknowledgedMessage` #179

Closed malletgu closed 1 week ago

malletgu commented 1 week ago

When a message is being sent to Kafka the acknowledgement should also contains the headers.

Motivation:

Resolves https://github.com/swift-server/swift-kafka-client/issues/144

Modifications:

Reused the parsing function from KafkaConsumer in the producer path to return headers in the ack.

Result:

Headers available in the acknowledgement for producers and still available for consumers as well.