请教一下,flinkKafkaConsumer.setCommitOffsetsOnCheckpoints(true);
和kafka自己的"enable.auto.commit"=true【默认就是true,
interval=5s】,在checkpoint的时候有啥区别,假如我已经enable了chk?

看注释flinkKafkaConsumer.setCommitOffsetsOnCheckpoints()方法的注释如下:
--------------------------------------------------------
/**
     * Specifies whether or not the consumer should commit offsets back to
Kafka on checkpoints.
     *
     * <p>This setting will only have effect if checkpointing is enabled for
the job. If
     * checkpointing isn't enabled, only the "auto.commit.enable" (for 0.8)
/ "enable.auto.commit"
     * (for 0.9+) property settings will be used.
     *
     * @return The consumer object, to allow function chaining.
     */
--------------------------------------------------------
我的理解是:意思是如果enable了checkpoint,然后设置flinkKafkaConsumer.setCommitOffsetsOnCheckpoints(true);
(貌似默认就是true),就会采用checkpoint的interval去向kafka提交offset? 
,而不采用auto.commit.enable的配置?这样理解对么?



--
Sent from: http://apache-flink.147419.n8.nabble.com/

回复