View Source KafkaEx.Protocol.Kayrock.Fetch.Request protocol (kafka_ex v1.0.0-rc.1)

This protocol is used to build Fetch requests.

Implementations must populate the request struct with:

  • replica_id - Should be -1 for consumers
  • max_wait_time - Maximum time to wait for messages in ms
  • min_bytes - Minimum bytes to accumulate before returning
  • topics - List of topic/partition/offset data to fetch
  • max_bytes (V3+) - Maximum bytes to return
  • isolation_level (V4+) - 0 for READ_UNCOMMITTED, 1 for READ_COMMITTED
  • log_start_offset (V5+) - Log start offset for partitions
  • session_id, epoch (V7+) - For incremental fetch sessions
  • current_leader_epoch (V9+) - Epoch of the current leader for partitions
  • rack_id (V11+) - Consumer rack ID for rack-aware fetch

All known versions (V0-V11) have explicit implementations. The Any fallback handles unknown future versions.

Summary

Types

t()

All the types that implement this protocol.

Types

@type t() :: term()

All the types that implement this protocol.

Functions

Link to this function

build_request(request, opts)

View Source
@spec build_request(t(), Keyword.t()) :: t()