AWS S3 Sink connector does not store Kafka message key
See original GitHub issueWhat version of the Stream Reactor are you reporting this issue for?
Latest master build
What is the expected behaviour?
The S3 sink connector to store the Kafka message along with its key inside S3.
What was observed?
The Kafka message key is ignored and only the value is stored.
What is your Connect cluster configuration (connect-avro-distributed.properties)?
bootstrap.servers=kafka:9092
key.converter=org.apache.kafka.connect.json.JsonConverter
value.converter=org.apache.kafka.connect.json.JsonConverter
key.converter.schemas.enable=false
value.converter.schemas.enable=false
offset.storage.file.filename=/tmp/connect.offsets
offset.flush.interval.ms=10000
plugin.path=/home/src/kafka/jars
group.id=kafka-connect
storage.topic=_connect-configs
offset.storage.topic=_connect-offsets
status.storage.topic=_connect-status
What is your connector properties configuration (my-connector.properties)?
name=S3SinkConnectorS3 # this can be anything
connector.class=io.lenses.streamreactor.connect.aws.s3.sink.S3SinkConnector
tasks.max=1
aws.auth.mode=Default
topics=test_yordan_kafka_connect
connect.s3.kcql="insert into `test:test-bucket` select * from test_yordan_kafka_connect STOREAS `JSON` WITH_FLUSH_COUNT = 5000"
connect.s3.aws.client=AWS
connect.s3.aws.region=eu-central-1
timezone=UTC
errors.log.enable=true
I did some debugging of the codebase and suspect the issue is the key is being ignored here: https://github.com/lensesio/stream-reactor/blob/master/kafka-connect-aws-s3/src/main/scala/io/lenses/streamreactor/connect/aws/s3/formats/JsonFormatWriter.scala#L41
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Amazon S3 Sink Connector for Confluent Platform
The Amazon S3 Sink connector exports data from Apache Kafka® topics to S3 objects in either Avro, JSON, or Bytes formats. Depending on...
Read more >Kafka connect S3 source connector ignores keys
I ignore how to make sure that .keys.json is taken into account to construct the Kafka keys when reading the data from S3....
Read more >Connect Kafka to S3: 6 Easy Steps - Hevo Data
This blog teaches you how to set up a Kafka to S3 integration. It provides a step-by-step guide to help you connect them...
Read more >Kafka to AWS S3 | S3 open source Kafka connector
A Kafka Connect sink connector for writing records from Kafka to AWS S3 ... Where the Kafka message key is not a primitive...
Read more >Amazon S3 sink connector
This example shows how to set up the Confluent Amazon S3 sink connector for ... DefaultPartitioner", "storage.class": "io.confluent.connect.s3.storage.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’ve solved this problem by following these steps:
JsonFormatStreamReader
- https://github.com/iosifnicolae2/stream-reactorAlso, I’ve tried the idea 1.ii by adding
but I’m getting:
EDIT: By building and using the
master
branch the above error gets solved - https://github.com/lensesio/stream-reactor/issues/865#issuecomment-1165647864.