You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by David Espinosa <es...@gmail.com> on 2018/08/08 12:30:56 UTC

Include Keys in FileStreamSink connector

Hi all,

I'm trying to backup the whole content of an avro topic into a file, and
later restoring the Kafka topic from the file using Kafka Connect. I'm
using avroconverters from both key and value, but key is not included in
the dump file.

Somebody knows how to include keys using Kafka Connect? (I'm using Kafka
Connect in distributed mode).

Btw, this is the request that I'm using to create the connector:

{
 "name": "mytopic-connector",
 "config": {
   "connector.class":
"org.apache.kafka.connect.file.FileStreamSourceConnector",
   "tasks.max": "1",
   "topic": "mytopic",
   "file": "/data/backups/mytopic.txt",
   "key.converter": "io.confluent.connect.avro.AvroConverter",
   "value.converter": "io.confluent.connect.avro.AvroConverter",
   "key.converter.schema.registry.url": "http://schema-registry:8081",
   "value.converter.schema.registry.url": "http://schema-registry:8081"
 }
} (editado)