@Override
    public synchronized byte[] generate(long position) {
        // Generate the byte array before the timestamp generation.
        byte[] result = new byte[size];

        // Do the timestamp generation as the very last task.
        buffer.clear();
        buffer.putLong(Time.SYSTEM.milliseconds());
        buffer.rewind();
        System.arraycopy(buffer.array(), 0, result, 0, Long.BYTES);
        return result;
    }
A PayloadGenerator which generates a timestamped constant payload.

The timestamp used for this class is in milliseconds since epoch, encoded directly to the first several bytes of the
payload.

This should be used in conjunction with TimestampRecordProcessor in the Consumer to measure true end-to-end latency
of a system.

`size` - The size in bytes of each message.

Here is an example spec:

{
   "type": "timestampConstant",
   "size": 512
}

This will generate a 512-byte message with the first several bytes encoded with the timestamp.
trogdor/src/main/java/org/apache/kafka/trogdor/workload/TimestampConstantPayloadGenerator.java