I am using php-rdkafka as php kafka client. I successfully product my test message by using test
group.and consume the message by using below code,
$kafkaConsumer = new RdKafka\Consumer();
$kafkaConsumer->addBrokers("127.0.0.1:9292");
$topic = $kafkaConsumer->newTopic("test");
$topic->consumeStart(0, RD_KAFKA_OFFSET_BEGINNING);
while (true) {
$msg = $topic->consume(0, 1000);
if($msg){
if ($msg->err) {
echo $msg->errstr(), "\n";
break;
} else {
echo $msg->payload, "\n";
}
}
}
But when I try to again set message in test
group and trying to consume message for test
group then I am getting old message as well as new message. So I just want to how can I acknowledge old message so I can get only new message not old one ? Can someone put some shine on this ?
My kafka version is 0.11.0.1