TaoZex commented on code in PR #2889:
URL:
https://github.com/apache/incubator-seatunnel/pull/2889#discussion_r981970800
##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/sink/KafkaSinkWriter.java:
##########
@@ -129,6 +143,9 @@ private Properties getKafkaProperties(Config pluginConfig) {
kafkaConfig.entrySet().forEach(entry -> {
kafkaProperties.put(entry.getKey(), entry.getValue().unwrapped());
});
+ if (pluginConfig.hasPath(ASSIGN_PARTITIONS)) {
+ kafkaProperties.put(ProducerConfig.PARTITIONER_CLASS_CONFIG,
"org.apache.seatunnel.connectors.seatunnel.kafka.sink.CustomPartitioner");
+ }
Review Comment:
Do you mean to let users write code to implement custom partitions?This may
not simplify the operation of the user.
Because other operations are implemented through config configuration, code
needs to be written here.
--
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]