encodePartition = ({ partition, timestamp = -1, maxNumOffsets = 1 }) => {
  return new Encoder()
    .writeInt32(partition)
    .writeInt64(timestamp)
    .writeInt32(maxNumOffsets)
}
@param {number} replicaId
@param {object} topics use timestamp=-1 for latest offsets and timestamp=-2 for earliest.
                       Default timestamp=-1. Example:
                         {
                           topics: [
                             {
                               topic: 'topic-name',
                               partitions: [{ partition: 0, timestamp: -1 }]
                             }
                           ]
                         }