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
@spec build_response( [KafkaEx.Messages.CreateTopics.TopicResult.t()], non_neg_integer() | nil ) :: KafkaEx.Messages.CreateTopics.t()
Builds CreateTopics struct from parsed topic results.
@spec parse_topic_results(list(), boolean()) :: [ KafkaEx.Messages.CreateTopics.TopicResult.t() ]
Parses topic errors from Kayrock response format to TopicResult structs.
@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.