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

Represents the result of a DeleteTopics API call.

This struct contains the results for all topics that were requested to be deleted, including any errors that occurred during deletion.

Fields

  • topic_results - List of TopicResult structs, one for each topic
  • throttle_time_ms - Time in milliseconds the request was throttled (V1+)

Example

%DeleteTopics{
  topic_results: [
    %TopicResult{topic: "my-topic", error: :no_error},
    %TopicResult{topic: "unknown-topic", error: :unknown_topic_or_partition}
  ],
  throttle_time_ms: 0
}

Summary

Functions

Builds a DeleteTopics struct from response data.

Returns the list of topics that failed to be deleted.

Returns the result for a specific topic.

Returns true if all topics were deleted successfully.

Returns the list of topics that were deleted successfully.

Types

@type t() :: %KafkaEx.Messages.DeleteTopics{
  throttle_time_ms: non_neg_integer() | nil,
  topic_results: [KafkaEx.Messages.DeleteTopics.TopicResult.t()]
}

Functions

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

Builds a DeleteTopics struct from response data.

Link to this function

failed_topics(delete_topics)

View Source
@spec failed_topics(t()) :: [KafkaEx.Messages.DeleteTopics.TopicResult.t()]

Returns the list of topics that failed to be deleted.

Link to this function

get_topic_result(delete_topics, topic_name)

View Source
@spec get_topic_result(t(), String.t()) ::
  KafkaEx.Messages.DeleteTopics.TopicResult.t() | nil

Returns the result for a specific topic.

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

Returns true if all topics were deleted successfully.

Link to this function

successful_topics(delete_topics)

View Source
@spec successful_topics(t()) :: [KafkaEx.Messages.DeleteTopics.TopicResult.t()]

Returns the list of topics that were deleted successfully.