becketqin commented on a change in pull request #8535: [FLINK-11693] Add
KafkaSerializationSchema that uses ProducerRecord
URL: https://github.com/apache/flink/pull/8535#discussion_r296118523
##########
File path:
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer.java
##########
@@ -481,27 +508,140 @@ public FlinkKafkaProducer(
* round-robin fashion.
* @param semantic Defines semantic that will be used by this producer
(see {@link FlinkKafkaProducer.Semantic}).
* @param kafkaProducersPoolSize Overwrite default KafkaProducers pool
size (see {@link FlinkKafkaProducer.Semantic#EXACTLY_ONCE}).
+ *
+ * @deprecated use {@link #FlinkKafkaProducer(String,
KafkaSerializationSchema, Properties, FlinkKafkaProducer.Semantic)}
+ */
+ @Deprecated
+ public FlinkKafkaProducer(
+ String defaultTopicId,
+ KeyedSerializationSchema<IN> serializationSchema,
+ Properties producerConfig,
+ Optional<FlinkKafkaPartitioner<IN>> customPartitioner,
+ FlinkKafkaProducer.Semantic semantic,
+ int kafkaProducersPoolSize) {
+ this(
+ defaultTopicId,
+ serializationSchema,
+ customPartitioner.orElse(null),
+ null, /* kafka serialization schema */
+ producerConfig,
+ semantic,
+ kafkaProducersPoolSize);
+ }
+
+ /**
+ * Creates a {@link FlinkKafkaProducer} for a given topic. The sink
produces its input to
+ * the topic. It accepts a keyed {@link KafkaSerializationSchema} for
serializing records to
Review comment:
It accepts a ~~keyed~~ {@link KafkaSerializationSchema}...?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services