Tools for administering or just interacting with a Kafka cluster.
Wraps the AdminClient
API, replacing the Scala admin APIs.
Like the underlying AdminClient
API, this namespace is subject to
change and should be considered of alpha stability.
Tools for administering or just interacting with a Kafka cluster. Wraps the `AdminClient` API, replacing the Scala admin APIs. Like the underlying `AdminClient` API, this namespace is subject to change and should be considered of alpha stability.
(alter-topic-config! client topics)
Given an AdminClient
and a sequence of topic descriptors having
:topic-config
, alters the live configuration of the specified
topics to correspond to the specified :topic-config
.
Given an `AdminClient` and a sequence of topic descriptors having `:topic-config`, alters the live configuration of the specified topics to correspond to the specified `:topic-config`.
(alter-topics* this topics)
(create-topics* this topics)
(delete-topics* this topics)
(describe-cluster* this)
(describe-configs* this configs)
(describe-topics* this topics)
(list-topics* this)
(client? x)
Predicate.
Return true
if and only if given an AdminClient
instance.
Predicate. Return `true` if and only if given an `AdminClient` instance.
(create-topics! client topics)
Given an AdminClient
and a collection of topic descriptors,
create the specified topics with their configuration(s).
Does not block until the created topics are ready. It may take some time for replicas and leaders to be chosen for newly created topics.
See #'topics-ready?
, #'topic-exists?
and #'retry-exists?
for
tools with which to wait for topics to be ready.
Given an `AdminClient` and a collection of topic descriptors, create the specified topics with their configuration(s). Does not block until the created topics are ready. It may take some time for replicas and leaders to be chosen for newly created topics. See `#'topics-ready?`, `#'topic-exists?` and `#'retry-exists?` for tools with which to wait for topics to be ready.
(delete-topics! client topics)
Given an AdminClient
and a sequence of topic descriptors, marks the
topics for deletion.
Does not block until the topics are deleted, just until the deletion request(s) are acknowledged.
Given an `AdminClient` and a sequence of topic descriptors, marks the topics for deletion. Does not block until the topics are deleted, just until the deletion request(s) are acknowledged.
(describe-cluster client)
Returns a DescribeClusterResult
describing the cluster.
Returns a `DescribeClusterResult` describing the cluster.
(describe-topics client)
(describe-topics client topics)
Given an AdminClient
and an optional collection of topic
descriptors, return a map from topic names to topic
descriptions.
If no topics are provided, describes all topics.
Note that the topic description does NOT include the topic's
configuration.See #'describe-topic-config
for that capability.
Given an `AdminClient` and an optional collection of topic descriptors, return a map from topic names to topic descriptions. If no topics are provided, describes all topics. Note that the topic description does NOT include the topic's configuration.See `#'describe-topic-config` for that capability.
(describe-topics-configs client topics)
Given an AdminClient
and a collection of topic descriptors, returns
the selected topics' live configuration as a map from topic names to
configured properties to metadata about each property including its
current value.
Given an `AdminClient` and a collection of topic descriptors, returns the selected topics' live configuration as a map from topic names to configured properties to metadata about each property including its current value.
(get-broker-config client broker-id)
Returns the broker config as a map.
Broker-id is an int, typically 0-2, get the list of valid broker ids using describe-cluster
Returns the broker config as a map. Broker-id is an int, typically 0-2, get the list of valid broker ids using describe-cluster
(list-topics client)
Given an AdminClient
, return a seq of topic records, being the
topics on the cluster.
Given an `AdminClient`, return a seq of topic records, being the topics on the cluster.
(partition-ids-of-topics client)
(partition-ids-of-topics client topics)
Given an AdminClient
and an optional sequence of topics, produces a
mapping from topic names to a sequence of the partition IDs for that
topic.
By default, enumerates the partition IDs for all topics.
Given an `AdminClient` and an optional sequence of topics, produces a mapping from topic names to a sequence of the partition IDs for that topic. By default, enumerates the partition IDs for all topics.
(retry-exists? client topic num-retries wait-ms)
Returns true
if topic exists. Otherwise spins as configured.
Returns `true` if topic exists. Otherwise spins as configured.
(topic-exists? client {:keys [topic-name] :as topic})
Verifies the existence of the topic.
Does not verify any config. details or values.
Verifies the existence of the topic. Does not verify any config. details or values.
(topics-ready? client topics)
Given an AdminClient
and a sequence topic descriptors, return
true
if and only if all listed topics have a leader and in-sync
replicas.
This can be used to determine if some set of newly created topics are healthy yet, or detect whether leader re-election has finished following the demise of a Kafka broker.
Given an `AdminClient` and a sequence topic descriptors, return `true` if and only if all listed topics have a leader and in-sync replicas. This can be used to determine if some set of newly created topics are healthy yet, or detect whether leader re-election has finished following the demise of a Kafka broker.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close