You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/09/28 05:52:14 UTC
[GitHub] [incubator-seatunnel] TaoZex commented on a diff in pull request #2889: [Improve][Connector-V2][Kafka Sink]custom partition
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org