You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Marc Magnin <ma...@gmail.com> on 2017/03/14 15:04:01 UTC

Using Kafka connect BYTES_SCHEMA

Hi,

When sending data using SourceRecord, I want to send to Kafka a byte array but I receive a base64 encoded array of my object.
 :
    @Override
    public SourceRecord[] getRecords(String kafkaTopic) {
        return new SourceRecord[]{new SourceRecord(null, null, topic.toString(), null,
                Schema.STRING_SCHEMA,   « test key »,
                Schema.BYTES_SCHEMA, mMessage.getPayload())};
    }

getPayload returns a byte array.

Any help on this would be great !
Many thanks,
Marc