|NO.Z.00053|——————————|BigDataEnd|——|Hadoop&Flink.V08|——|Flink.v08|Flink Connector|kafka|Kafka consumer offset自动提交|

一、Kafka consumer offset自动提交:
### --- kafka consumer offset自动提交

~~~     # kafka consumer offset自动提交的配置需要根据job是否开启checkpoint来区分
~~~     checkpoint关闭时:
~~~     checkpoint开启时:
~~~     如果启用了checkpoint,并且启用了checkpoint完成时提交offset,返回ON_CHECKPOINTS。
~~~     如果未启用checkpoint,但是启用了自动提交,返回KAFKA_PERIODIC。
~~~     其他情况都返回DISABLED。
~~~     # OffsetCommitMode 是一个枚举类型,具有如下三个值:

~~~     DISABLED:完全禁用offset提交。
~~~     ON_CHECKPOINTS:当checkpoint完成的时候再提交offset。
~~~     KAFKA_PERIODIC:周期性提交offset。

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on 2022-04-13 15:19  yanqi_vip  阅读(33)  评论(0)    收藏  举报

导航