fapaul commented on a change in pull request #16783:
URL: https://github.com/apache/flink/pull/16783#discussion_r690114795



##########
File path: 
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/sink/KafkaRecordSerializationSchema.java
##########
@@ -85,4 +86,28 @@ default void open(
          */
         int[] getPartitionsForTopic(String topic);
     }
+
+    /**
+     * Creates a default schema builder to provide common building blocks i.e. 
key serialization,
+     * value serialization, partitioning; based on a static target topic.
+     *
+     * @param topic target topic for all records
+     * @param <T> type of incoming elements
+     * @return {@link KafkaRecordSerializationSchemaBuilder}
+     */
+    static <T> KafkaRecordSerializationSchemaBuilder<T> builder(String topic) {
+        return new KafkaRecordSerializationSchemaBuilder<T>(topic);
+    }
+
+    /**
+     * Creates a default schema builder to provide common building blocks i.e. 
key serialization,
+     * value serialization, partitioning; based on a dynamic target topic.
+     *
+     * @param topicSelector to dynamically derive the target topic based on 
the incoming element
+     * @param <T> type of incoming elements
+     * @return {@link KafkaRecordSerializationSchemaBuilder}
+     */
+    static <T> KafkaRecordSerializationSchemaBuilder<T> builder(Function<T, 
String> topicSelector) {
+        return new KafkaRecordSerializationSchemaBuilder<T>(topicSelector);
+    }

Review comment:
       I am not sure I fully understand that comment. Is this an idea or a 
proper suggestion? :)




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