FetchRequest is a message request with Fetch API key and the following properties:

  • Version

  • Replica Id

  • maxWait

  • minBytes

  • maxBytes

  • Fetch Data (Map<TopicPartition, PartitionData>)

  • IsolationLevel

  • TopicPartitions to forget (List<TopicPartition>)

  • FetchMetadata

  • Rack Id

FetchRequest is created when:

FetchRequest.Builder Utility

FetchRequest.Builder is a request builder to build a FetchRequest.

FetchRequest build(
  short version)

FetchRequest.Builder is used when…​FIXME

Creating FetchRequest.Builder for Kafka Consumers — FetchRequest.Builder.forConsumer Utility

Builder forConsumer(
  int maxWait,
  int minBytes,
  Map<TopicPartition, PartitionData> fetchData)


forConsumer is used when Fetcher is requested to sendFetches (for KafkaConsumer to poll for records).

Creating FetchRequest.Builder for Partition Replicas — FetchRequest.Builder.forReplica Utility

Builder forReplica(
  short allowedVersion,
  int replicaId,
  int maxWait,
  int minBytes,
  Map<TopicPartition, PartitionData> fetchData)

forReplica simply creates a new FetchRequest.Builder (with the min and max versions exactly the given allowedVersion).


forReplica is used when:

Creating FetchRequest from Byte Buffer — parse Utility

FetchRequest parse(
  ByteBuffer buffer,
  short version)


parse is used when…​FIXME

results matching ""

    No results matching ""