FetchRequest constructor

FetchRequest(
  1. int replicaId,
  2. int maxWaitMs,
  3. int minBytes,
  4. List<FetchTopic> topics, {
  5. int maxBytes = 1048576,
})

Creates a request and validates consumer identity and byte/wait limits.

Implementation

FetchRequest(this.replicaId, this.maxWaitMs, this.minBytes, this.topics,
    {this.maxBytes = 1048576}) {
  if (replicaId != -1 || maxWaitMs < 0 || minBytes < 0 || maxBytes <= 0) {
    throw ArgumentError('Invalid consumer fetch limits or replicaId');
  }
}