Tools to administer or interact 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 to administer or interact 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.
(->AdminClient kafka-config)Given a Kafka properties map having "bootstrap.servers", return
an AdminClient bootstrapped off of the configured servers.
Given a Kafka properties map having `"bootstrap.servers"`, return an `AdminClient` bootstrapped off of the configured servers.
(alter-client-quotas! client alterations)Alter Kafka client quotas using ClientQuotaAlteration values.
Alter Kafka client quotas using `ClientQuotaAlteration` values.
(alter-partition-reassignments! client reassignments)Alter partition reassignments using a TopicPartition-to-Optional map.
Alter partition reassignments using a TopicPartition-to-Optional map.
(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-partition-reassignments* this reassignments)(describe-log-dirs* this broker-ids)(alter-topics* this topics)(delete-topics* this topics)(list-topics* this)(delete-acls* this filters)(describe-client-quotas* this filter)(list-consumer-group-offsets* this group-offsets)(alter-client-quotas* this alterations)(describe-consumer-groups* this group-ids)(create-topics* this topics)(describe-topics* this topics)(list-partition-reassignments* this partitions)(describe-cluster* this)(describe-configs* this configs)(describe-metadata-quorum* this)(describe-acls* this filter)(create-partitions* this partitions)(create-acls* this acls)(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-acls! client acls)Create Kafka ACL bindings.
Create Kafka ACL bindings.
(create-partitions! client partitions)Increase the partition count for topics using Kafka NewPartitions values.
Increase the partition count for topics using Kafka `NewPartitions` values.
(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-acls! client filters)Delete Kafka ACL bindings matching the supplied filters.
Delete Kafka ACL bindings matching the supplied filters.
(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-acls client filter)Describe ACL bindings matching a Kafka ACL filter.
Describe ACL bindings matching a Kafka ACL filter.
(describe-client-quotas client filter)Describe client quotas matching a Kafka quota filter.
Describe client quotas matching a Kafka quota filter.
(describe-cluster client)Returns a DescribeClusterResult describing the cluster.
Returns a `DescribeClusterResult` describing the cluster.
(describe-consumer-groups client group-ids)Describe the named consumer groups.
Describe the named consumer groups.
(describe-log-dirs client broker-ids)Describe log directories for the supplied broker IDs.
Describe log directories for the supplied broker IDs.
(describe-metadata-quorum client)Describe the KRaft metadata quorum.
Describe the KRaft metadata quorum.
(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-consumer-group-offsets client group-offsets)List offsets for consumer groups using Kafka offset request specs.
List offsets for consumer groups using Kafka offset request specs.
(list-partition-reassignments client)(list-partition-reassignments client partitions)List partition reassignments, optionally restricted to partitions.
List partition reassignments, optionally restricted to partitions.
(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 builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |