Abacn opened a new issue, #39841:
URL: https://github.com/apache/beam/issues/39841

   ### What happened?
   
   KafkaWriteSchemaTransformProvider hardcodes a constant dummy key `new 
byte[1]`, causing 100% of messages to route to a single partition.
   
   On SchemaTransform expands, it maps Beam Row to Kafka message:
   
   
https://github.com/apache/beam/blob/88b3ee7b488aa8a3e85e8dd04b64349384818d16/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaWriteSchemaTransformProvider.java#L256
   
   which inserts a constant key `new byte[1]`:
   
   
https://github.com/apache/beam/blob/88b3ee7b488aa8a3e85e8dd04b64349384818d16/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaWriteSchemaTransformProvider.java#L154
   
   as a result, all produced messages are routed to a single partition in Kafka.
   
   Current workaround:
   
   Specify "partitioner.class": 
"org.apache.kafka.clients.producer.RoundRobinPartitioner" in 
producer_config_updates, to force distributing single key elements to different 
partitions.
   
   
   ### Issue Priority
   
   Priority: 2 (default / most bugs should be filed as P2)
   
   ### Issue Components
   
   - [ ] Component: Python SDK
   - [ ] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [ ] Component: IO connector
   - [ ] Component: Beam YAML
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Infrastructure
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Prism Runner
   - [ ] Component: Twister2 Runner
   - [ ] Component: Hazelcast Jet Runner
   - [ ] Component: Google Cloud Dataflow Runner


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to