class Kafka::FetchOperation
def fetch_from_partition(topic, partition, offset: :latest, max_bytes: 1048576)
def fetch_from_partition(topic, partition, offset: :latest, max_bytes: 1048576) if offset == :earliest offset = -2 elsif offset == :latest offset = -1 end @topics[topic] ||= {} @topics[topic][partition] = { fetch_offset: offset, max_bytes: max_bytes, } end