View Source KafkaEx.Protocol.Kayrock.CreateTopics.ResponseHelpers (kafka_ex v1.0.0-rc.1)

Shared helper functions for parsing CreateTopics responses across all versions.

Summary

Functions

Builds CreateTopics struct from parsed topic results.

Parses topic errors from Kayrock response format to TopicResult structs.

Parses topic results from V5 Kayrock response format to TopicResult structs.

Functions

Link to this function

build_response(topic_results, throttle_time_ms \\ nil)

View Source

Builds CreateTopics struct from parsed topic results.

Link to this function

parse_topic_results(topic_errors, has_error_message?)

View Source
@spec parse_topic_results(list(), boolean()) :: [
  KafkaEx.Messages.CreateTopics.TopicResult.t()
]

Parses topic errors from Kayrock response format to TopicResult structs.

Link to this function

parse_v5_topic_results(topics)

View Source
@spec parse_v5_topic_results(list()) :: [
  KafkaEx.Messages.CreateTopics.TopicResult.t()
]

Parses topic results from V5 Kayrock response format to TopicResult structs.

V5 adds per-topic fields: num_partitions, replication_factor, and configs. Each config entry has: name, value, read_only, config_source, is_sensitive.