/** * Read the next message. * Override the parent method: we don't want to increment the byte offset * * @return string Message (raw) * @throws \Kafka\Exception when the message cannot be read from the stream buffer */ protected function getMessage() { $msg = parent::getMessage(); // do not increment the offset for internal iterators $this->validByteCount = 0; return $msg; }