org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducerBase Java Examples
The following examples show how to use
org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducerBase.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Kafka010DynamicSink.java From flink with Apache License 2.0 | 5 votes |
@Override protected FlinkKafkaProducerBase<RowData> createKafkaProducer( String topic, Properties properties, SerializationSchema<RowData> serializationSchema, Optional<FlinkKafkaPartitioner<RowData>> partitioner) { return new FlinkKafkaProducer010<>( topic, serializationSchema, properties, partitioner.orElse(null)); }
Example #2
Source File: Kafka09AvroTableSink.java From df_data_service with Apache License 2.0 | 4 votes |
@Override protected FlinkKafkaProducerBase<Tuple2<Boolean, Row>> createKafkaProducer(String topic, Properties properties, SerializationSchema<Tuple2<Boolean, Row>> serializationSchema, FlinkKafkaPartitioner<Tuple2<Boolean, Row>> partitioner) { return new FlinkKafkaProducer09<>(topic, serializationSchema, properties, partitioner); }
Example #3
Source File: KafkaTableSink.java From df_data_service with Apache License 2.0 | 2 votes |
/** * Returns the version-specifid Kafka producer. * * @param topic Kafka topic to produce to. * @param properties Properties for the Kafka producer. * @param serializationSchema Serialization schema to use to create Kafka records. * @param partitioner Partitioner to select Kafka partition. * @return The version-specific Kafka producer */ protected abstract FlinkKafkaProducerBase<Tuple2<Boolean, Row>> createKafkaProducer( String topic, Properties properties, SerializationSchema<Tuple2<Boolean, Row>> serializationSchema, FlinkKafkaPartitioner<Tuple2<Boolean, Row>> partitioner);