What does a dash represents in CURRENT-OFFSET

帅比萌擦擦* 提交于 2021-02-04 21:15:47

问题


Referring below screenshot of consumer-group description, i am trying to understand what does "-" means here for CURRENT-OFFSET. Does it says that messages are not consumed from partition 1 & 3 even though the partitions are allocated to a consumer. LOG-END offset for partition 1 & 3 are 281 & 277 respectively .


回答1:


CURRENT-OFFSET means the current max offset of the consumed messages of the partition for this consumer instance, whereas LOG-END-OFFSET is the offset of the latest message in the partition.

In your case, consumers have already consumed all the messages for partition 0 and 2, that's why the lags for those two partitions are zero. However, for partition 1 and 3, either there were no consumer instances assigned to them or consumers failed to read any records for those two partitions.




回答2:


Partitions 1 and 3 are not reporting the current-offset and the lag because no Kafka commits are done for them. That can be the case even if consumer instances are assigned to them that are reading records.



来源:https://stackoverflow.com/questions/48496665/what-does-a-dash-represents-in-current-offset

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!