/** * Get largest offset * * Method that will return the largets available offset in * the given partition. * * @return Offset */ private function getLargestOffset() { $offsets = $this->consumer->offsets($this->topic, $this->partition, \Kafka\Kafka::OFFSETS_LATEST); return $offsets[0]; }