public StampedRecord poll(final long wallClockTime) {
        final StampedRecord recordToReturn = headRecord;

        consumedSensor.record(headRecordSizeInBytes, wallClockTime);

        headRecord = null;
        headRecordSizeInBytes = 0L;
        partitionTime = Math.max(partitionTime, recordToReturn.timestamp);

        updateHead();

        return recordToReturn;
    }
Get the next {@link StampedRecord} from the queue

@return StampedRecord
streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordQueue.java