Skip to content

Support Kafka Headers [0.11.0] #122

Open
@Saheb

Description

@Saheb

https://cwiki.apache.org/confluence/display/KAFKA/KIP-82+-+Add+Record+Headers

With the latest release 0.11.0.0, Kafka's ProducerRecord allows adding headers in messages, would be good to have KafkaProducerRecord abstract out the same functionality at this client level.

    /**
     * Creates a record to be sent to a specified topic and partition
     *
     * @param topic The topic the record will be appended to
     * @param partition The partition to which the record should be sent
     * @param key The key that will be included in the record
     * @param value The record contents
     * @param headers The headers that will be included in the record
     */
    public ProducerRecord(String topic, Integer partition, K key, V value,  Iterable<Header> headers) {
        this(topic, partition, null, key, value, headers);
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions