Re: KafkaSink self-defined RoundRobinPartitioner not able to discover new partitions

2024-07-31 Thread Lei Wang
Seems i needn't to define a FlinkRoundRoubinPartitioner and just use the RoundRobinPartitioner suppllied in kafka: props.setProperty(ProducerConfig.PARTITIONER_CLASS_CONFIG, RoundRobinPartitioner.class.getName()); In this way the new partitions will be found dynamically. Howerever, there's a bug i

KafkaSink self-defined RoundRobinPartitioner not able to discover new partitions

2024-07-30 Thread Lei Wang
I wrote a FlinkRoundRobinPartitioner extends FlinkKafkaPartitioner and use it as following: KafkaSink kafkaSink = KafkaSink.builder() .setBootstrapServers(sinkServers).setKafkaProducerConfig(props) .setDeliverGuarantee(DeliveryGuarantee.AT_LEAST_ONCE) .setRecordSerializer(KafkaRecordSerializationS