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

This protocol is used to build Metadata requests.

Each Kayrock.Metadata version (V0-V9) implements this protocol to transform request options into the appropriate Kayrock request struct.

The Any fallback is retained only for forward compatibility with unknown future versions beyond what Kayrock currently supports.

Summary

Types

t()

All the types that implement this protocol.

Functions

Builds a Metadata request from options.

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()

Builds a Metadata request from options.

Options

  • :topics - List of topic names to fetch metadata for, or nil/[] for all topics
  • :allow_auto_topic_creation - Whether to auto-create topics (V4+)

Returns

A Kayrock.Metadata request struct ready to be sent to Kafka.