Liking cljdoc? Tell your friends :D

kafka-metamorphosis.admin

Administrative functions for Kafka - topic management, cluster info, etc.

Administrative functions for Kafka - topic management, cluster info, etc.
raw docstring

close!clj

(close! admin-client)

Close the AdminClient and release resources.

Close the AdminClient and release resources.
sourceraw docstring

create-admin-clientclj

(create-admin-client config)

Create a Kafka AdminClient with the given configuration.

Example config: {:bootstrap-servers "localhost:9092"}

Create a Kafka AdminClient with the given configuration.

Example config:
{:bootstrap-servers "localhost:9092"}
sourceraw docstring

create-topic!clj

(create-topic! admin-client topic-name)
(create-topic! admin-client
               topic-name
               {:keys [partitions replication-factor configs]
                :or {partitions 1 replication-factor 1 configs {}}})

Create a new Kafka topic.

Options: :partitions - number of partitions (default: 1) :replication-factor - replication factor (default: 1) :configs - map of topic configurations

Usage: (create-topic! admin-client "my-topic") (create-topic! admin-client "my-topic" {:partitions 3 :replication-factor 2}) (create-topic! admin-client "my-topic" {:partitions 3 :configs {"cleanup.policy" "compact"}})

Create a new Kafka topic.

Options:
:partitions - number of partitions (default: 1)
:replication-factor - replication factor (default: 1)
:configs - map of topic configurations

Usage:
(create-topic! admin-client "my-topic")
(create-topic! admin-client "my-topic" {:partitions 3 :replication-factor 2})
(create-topic! admin-client "my-topic" {:partitions 3 
                                         :configs {"cleanup.policy" "compact"}})
sourceraw docstring

create-topic-if-not-exists!clj

(create-topic-if-not-exists! admin-client topic-name)
(create-topic-if-not-exists! admin-client topic-name options)

Create a topic only if it doesn't already exist.

Usage: (create-topic-if-not-exists! admin-client "my-topic" {:partitions 3})

Create a topic only if it doesn't already exist.

Usage:
(create-topic-if-not-exists! admin-client "my-topic" {:partitions 3})
sourceraw docstring

delete-topic!clj

(delete-topic! admin-client topic-name)

Delete a Kafka topic.

Usage: (delete-topic! admin-client "my-topic")

Delete a Kafka topic.

Usage:
(delete-topic! admin-client "my-topic")
sourceraw docstring

describe-topicclj

(describe-topic admin-client topic-name)

Get detailed information about a topic.

Usage: (describe-topic admin-client "my-topic")

Get detailed information about a topic.

Usage:
(describe-topic admin-client "my-topic")
sourceraw docstring

get-cluster-infoclj

(get-cluster-info admin-client)

Get basic information about the Kafka cluster.

Usage: (get-cluster-info admin-client)

Get basic information about the Kafka cluster.

Usage:
(get-cluster-info admin-client)
sourceraw docstring

list-topicsclj

(list-topics admin-client)

List all topics in the Kafka cluster. Returns a set of topic names.

Usage: (list-topics admin-client)

List all topics in the Kafka cluster.
Returns a set of topic names.

Usage:
(list-topics admin-client)
sourceraw docstring

topic-exists?clj

(topic-exists? admin-client topic-name)

Check if a topic exists.

Usage: (topic-exists? admin-client "my-topic")

Check if a topic exists.

Usage:
(topic-exists? admin-client "my-topic")
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close