Lost first message when start consumer
before i start the kafka consumer ,i use kafka shell get kafka topic consumption progress
| TOPIC | PARTITION | CURRENT-OFFSET | LOG-END-OFFSET | LAG | CONSUMER-ID | HOST | CLIENT-ID |
|---|---|---|---|---|---|---|---|
| test | 0 | 212 | 213 | 1 | - | - | - |
then i start the kafka consumer,i got this info
consoler_logger_kafka.DEBUG: Get current fetch offset sucess, result: [{"topicName":"test","partitions":[{"partition":0,"errorCode":0,"metadata":"","offset":212}]}] [] []
consoler_logger_kafka.DEBUG: Start Request ClientId: kafka-php ApiKey: HeartbeatRequest ApiVersion: 0 [] []
consoler_logger_kafka.DEBUG: Start Request ClientId: kafka-php ApiKey: OffsetRequest ApiVersion: 0 [] []
consoler_logger_kafka.DEBUG: Fetch message start, params:{"max_wait_time":100,"replica_id":-1,"min_bytes":"1000","data":[{"topic_name":"test","partitions":[{"partition_id":0,"offset":213,"max_bytes":65536}]}]} [] []
consoler_logger_kafka.DEBUG: Start Request ClientId: kafka-php ApiKey: FetchRequest ApiVersion: 2 [] []
consoler_logger_kafka.DEBUG: Start Request ClientId: kafka-php ApiKey: OffsetFetchRequest ApiVersion: 1 [] []
The Get current fetch offset return offset is 212, Fetch message params offset is 213 Is this cause lost one message?
i got the same problems in tag2.0.8.0, so i fix it by myself in local repository.
The official team do not do any thing about it.....
so sad!!!!
@zmisgod, have you considered creating a PR?
@Sevavietl yes ,i try to pull request for tag v2.0.8.0, but ......

@zmisgod that is good,thank u for your kindness. Finally,i have to use rdkafka
I am also facing same issue..whenever we start consumer..it always lost the first message...
The same problem ...