@Override
                    public int compare(PartitionInfo o1, PartitionInfo o2) {
                        return Integer.compare(o1.partition(), o2.partition());
                    }
Creates a FlinkKafkaProducer for a given topic. The sink produces its input to the topic. It
accepts a {@link KafkaSerializationSchema} and possibly a custom {@link
FlinkKafkaPartitioner}.

<p>If a partitioner is not provided, written records will be partitioned by the attached key
of each record (as determined by {@link KeyedSerializationSchema#serializeKey(Object)}). If
written records do not have a key (i.e., {@link
KeyedSerializationSchema#serializeKey(Object)} returns {@code null}), they will be
distributed to Kafka partitions in a round-robin fashion.

@param defaultTopic The default topic to write data to
@param keyedSchema A serializable serialization schema for turning user objects into a
        kafka-consumable byte[] supporting key/value messages
@param customPartitioner A serializable partitioner for assigning messages to Kafka
        partitions. If a partitioner is not provided, records will be partitioned by the key of
        each record (determined by {@link KeyedSerializationSchema#serializeKey(Object)}). If the
        keys are {@code null}, then records will be distributed to Kafka partitions in a
        round-robin fashion.
@param kafkaSchema A serializable serialization schema for turning user objects into a
        kafka-consumable byte[] supporting key/value messages
@param producerConfig Configuration properties for the KafkaProducer. 'bootstrap.servers.' is
        the only required argument.
@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}).
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/kafka/src/main/java/org/apache/inlong/sort/kafka/FlinkKafkaProducer.java