add method

void add(
  1. String topicName,
  2. int partitionId,
  3. int fetchOffset, [
  4. int maxBytes = 65536,
])

Adds topicName with paritionId to this FetchRequest. fetchOffset defines the offset to begin this fetch from.

Implementation

void add(String topicName, int partitionId, int fetchOffset, [int maxBytes = 65536]) {
  //
  if (!_topics.containsKey(topicName)) {
    _topics[topicName] = [];
  }
  _topics[topicName]?.add(_FetchPartitionInfo(partitionId, fetchOffset, maxBytes));
}