Hisoka-X commented on code in PR #6657:
URL: https://github.com/apache/seatunnel/pull/6657#discussion_r1561970907


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/sink/KafkaSinkFactory.java:
##########
@@ -39,23 +39,26 @@ public String factoryIdentifier() {
     @Override
     public OptionRule optionRule() {
         return OptionRule.builder()
-                .required(Config.FORMAT, Config.BOOTSTRAP_SERVERS)
-                .conditional(
-                        Config.FORMAT,
-                        Arrays.asList(
-                                MessageFormat.JSON,
-                                MessageFormat.CANAL_JSON,
-                                MessageFormat.TEXT,
-                                MessageFormat.OGG_JSON,
-                                MessageFormat.AVRO),
-                        Config.TOPIC)
+                .required(Config.TOPIC, Config.BOOTSTRAP_SERVERS)
                 .optional(
+                        Config.FORMAT,
                         Config.KAFKA_CONFIG,
                         Config.ASSIGN_PARTITIONS,
                         Config.TRANSACTION_PREFIX,
                         Config.SEMANTICS,
                         Config.PARTITION,
                         Config.PARTITION_KEY_FIELDS)
+                .conditional(

Review Comment:
   It can verify the legality of the value corresponding to a meaningful key, 
thereby ensuring the normal operation of the job, and that unexpected values 
can be fed back to the user as early as possible. But for useless keys, not 
telling users to delete them is based on two principles: 1. These keys will not 
affect the normal operation of the job. 2. If we delete a key, the key may 
still exist in the user's own config. We hope that the user can run job 
normally without changing the config.



-- 
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