private function commitOffset() { if ($this->hasCommits) { $this->metadata->commitOffset($this->groupId, $this->topic, $this->brokerId, $this->partition, $this->consumer->getWatermark()); $this->hasCommits = false; } $this->lastCommitOffset = time(); }