Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Kafka Headers [0.11.0] #122

Open
Saheb opened this issue Sep 19, 2017 · 0 comments
Open

Support Kafka Headers [0.11.0] #122

Saheb opened this issue Sep 19, 2017 · 0 comments

Comments

@Saheb
Copy link
Collaborator

Saheb commented Sep 19, 2017

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);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant