View Source KafkaEx.Messages.CreateTopics.TopicResult (kafka_ex v1.0.0-rc.1)

Represents the result of creating a single topic.

Fields

  • topic - Name of the topic
  • error - Error code as atom (:no_error on success)
  • error_message - Human-readable error message (V1+, nil for V0)
  • num_partitions - Number of partitions created (V5+, nil for V0-V4)
  • replication_factor - Replication factor (V5+, nil for V0-V4)
  • configs - List of topic config maps (V5+, nil for V0-V4). Each config map has: :name, :value, :read_only, :config_source, :is_sensitive

Summary

Functions

Builds a TopicResult struct.

Returns true if the topic was created successfully.

Types

@type config_entry() :: %{
  name: String.t(),
  value: String.t() | nil,
  read_only: boolean(),
  config_source: integer(),
  is_sensitive: boolean()
}
@type t() :: %KafkaEx.Messages.CreateTopics.TopicResult{
  configs: [config_entry()] | nil,
  error: atom(),
  error_message: String.t() | nil,
  num_partitions: integer() | nil,
  replication_factor: integer() | nil,
  topic: String.t()
}

Functions

@spec build(Keyword.t()) :: t()

Builds a TopicResult struct.

@spec success?(t()) :: boolean()

Returns true if the topic was created successfully.