问题
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