Manage and inspect topics, brockers, configurations and ACLs.
Manage and inspect topics, brockers, configurations and ACLs.
(acls client)
(acls client acl-filter)
(acls client acl-filter opts)
Gets ACLs.
@ client Admin client.
@ acl-filter (nilable)
ACL filter.
Cf. milena.interop.java/acl-binding-filter
@ opts (nilable)
Cf. M.interop.java/describe-acls-options
=> Cf. milena.interop.clj/describe-acls-result
Ex. (acls client)
(acls client
{:resource {:name :topic
:type "my-topic"}
:access-control {:permission :allow
:operation :create}})
Gets ACLs. @ client Admin client. @ acl-filter (nilable) ACL filter. Cf. `milena.interop.java/acl-binding-filter` @ opts (nilable) Cf. `M.interop.java/describe-acls-options` => Cf. `milena.interop.clj/describe-acls-result` Ex. (acls client) (acls client {:resource {:name :topic :type "my-topic"} :access-control {:permission :allow :operation :create}})
(acls-create client acls)
(acls-create client acls opts)
Creates acls.
@ client Admin client.
@ acls
List of ACLs.
Cf. milena.interop.java/acl-binding
@ opts (nilable)
Cf. milena.interop.java/create-acls-options
=> Cf. milena.interop.clj/create-acls-result
Creates acls. @ client Admin client. @ acls List of ACLs. Cf. `milena.interop.java/acl-binding` @ opts (nilable) Cf. `milena.interop.java/create-acls-options` => Cf. `milena.interop.clj/create-acls-result`
(acls-delete client acl-filters)
(acls-delete client acl-filters opts)
Deletes acls.
@ client Admin client.
@ acl-filters
List of acl filters.
Cf. milena.interop.java/acl-binding-filter
=> Cf. milena.interop.clj/delete-acls-result
Ex. (acls-delete client [{:resource {:name "my-topic" :type :topic} :access-control {:permission :allow :operation :alter}}])
Deletes acls. @ client Admin client. @ acl-filters List of acl filters. Cf. `milena.interop.java/acl-binding-filter` => Cf. `milena.interop.clj/delete-acls-result` Ex. (acls-delete client [{:resource {:name "my-topic" :type :topic} :access-control {:permission :allow :operation :alter}}])
(close client)
(close client timeout-ms)
Closes the admin client and releases all associated resources.
@ client Admin client.
@ timeout-ms A timeout in milliseconds can be provided to allow for ongoing operations to complete gracefully. New operations will NOT be accepted during this duration. Operations not yet completed at this time will throw org.apache.kafka.common.errors.TimeoutException.
=> nil
Closes the admin client and releases all associated resources. @ client Admin client. @ timeout-ms A timeout in milliseconds can be provided to allow for ongoing operations to complete gracefully. New operations will NOT be accepted during this duration. Operations not yet completed at this time will throw org.apache.kafka.common.errors.TimeoutException. => nil
(cluster client)
(cluster client opts)
Gets information about the nodes in the cluster.
@ client Admin client.
@ opts (nilable)
Cf. milena.interop.java/describe-cluster-options
=> Cf. milena.interop.clj/describe-cluster-result
Gets information about the nodes in the cluster. @ client Admin client. @ opts (nilable) Cf. `milena.interop.java/describe-cluster-options` => Cf. `milena.interop.clj/describe-cluster-result`
(config client resources)
(config client resources opts)
Gets the configuration of the given resources.
@ client Admin client.
@ resources
Cf. milena.interop.java/config-resources
@ opts (nilable)
Cf. milena.interop.java/describe-configs-options
=> Cf. milena.interop.clj/describe-configs-result
Ex. (config client {:topics #{"some-topic" "another-topic"} :brokers #{"0" "1"}})
Gets the configuration of the given resources. @ client Admin client. @ resources Cf. `milena.interop.java/config-resources` @ opts (nilable) Cf. `milena.interop.java/describe-configs-options` => Cf. `milena.interop.clj/describe-configs-result` Ex. (config client {:topics #{"some-topic" "another-topic"} :brokers #{"0" "1"}})
(config-alter client configs)
(config-alter client configs opts)
Alter the configuration of the given resources.
@ client Admin client.
@ configs
Resource configurations.
Cf. milena.interop.java/alter-configs
@ opts (nilable)
Cf. milena.interop.java/alter-configs-options
=> Cf. milena.interop.clj/alter-configs-result
Ex. (config-alter client {:brokers {"0" {:delete.topic.enable true}} :topics {"my-topic" {:cleanup.policy "compact"}}})
Alter the configuration of the given resources. @ client Admin client. @ configs Resource configurations. Cf. `milena.interop.java/alter-configs` @ opts (nilable) Cf. `milena.interop.java/alter-configs-options` => Cf. `milena.interop.clj/alter-configs-result` Ex. (config-alter client {:brokers {"0" {:delete.topic.enable true}} :topics {"my-topic" {:cleanup.policy "compact"}}})
(make)
(make {:as opts :keys [nodes config] :or {nodes [["localhost" 9092]]}})
Builds a Kafka admin client.
@ opts (nilable) {:nodes (nilable) A list of [host port].
:config (nilable)
Kafka configuration.
Cf. https://kafka.apache.org/documentation/#adminclientconfigs}
=> org.apache.kafka.clients.admin.AdminClient
Ex. (make {:nodes [["some_host" 9092]] :config {:client.id "some_id"}})
Builds a Kafka admin client. @ opts (nilable) {:nodes (nilable) A list of [host port]. :config (nilable) Kafka configuration. Cf. https://kafka.apache.org/documentation/#adminclientconfigs} => org.apache.kafka.clients.admin.AdminClient Ex. (make {:nodes [["some_host" 9092]] :config {:client.id "some_id"}})
(partitions-create client topics-to-new-partitions)
(partitions-create client topics-to-new-partitions opts)
Increases the number of partitions for the given topics.
<!> Does not repartition existing topics and the partitioning of new records will be different <!>
@ client Admin client.
@ topics-to-new-partitions
Cf. milena.interop.java/topics-to-new-partitions
@ opts (nilable) Cf. `milena.interop.java.create-partitions-options
=> milena.interop.clj/create-partitions-result
Ex. (partitions-create client {:n 3 :assignments [[1 2] [2 3] [3 1]]})
Increases the number of partitions for the given topics. <!> Does not repartition existing topics and the partitioning of new records will be different <!> @ client Admin client. @ topics-to-new-partitions Cf. `milena.interop.java/topics-to-new-partitions` @ opts (nilable) Cf. `milena.interop.java.create-partitions-options => `milena.interop.clj/create-partitions-result` Ex. (partitions-create client {:n 3 :assignments [[1 2] [2 3] [3 1]]})
(topics client)
(topics client opts)
Gets the topics available in the cluster.
@ client Admin client.
@ opts (nilable)
Cf. milena.interop.java/list-topics-options
=> A future
Cf. milena.interop.clj/topic-listings
Gets the topics available in the cluster. @ client Admin client. @ opts (nilable) Cf. `milena.interop.java/list-topics-options` => A future Cf. `milena.interop.clj/topic-listings`
(topics-create client new-topics)
(topics-create client new-topics opts)
Creates new topics.
This operation is supported by brokers with version 0.10.1.0 or higher.
@ client Admin client.
@ topics
A map of topic-name to topic-args.
Cf. milena.interop.java/new-topic
@ opts (nilable)
Cf. milena.interop.java/create-topics-options
=> milena.interop.clj/create-topics-result
Ex. (topics-create client {"my-new-topic" {:partitions 4 :replication-factor 1 :config {:cleanup.policy "compact"}}})
Creates new topics. This operation is supported by brokers with version 0.10.1.0 or higher. @ client Admin client. @ topics A map of topic-name to topic-args. Cf. `milena.interop.java/new-topic` @ opts (nilable) Cf. `milena.interop.java/create-topics-options` => `milena.interop.clj/create-topics-result` Ex. (topics-create client {"my-new-topic" {:partitions 4 :replication-factor 1 :config {:cleanup.policy "compact"}}})
(topics-delete client topics)
(topics-delete client topics opts)
Deletes topics.
@ client Admin client.
@ topics List of topic names.
@ opts (nilable)
Cf. milena.interop.java/delete-topics-options
=> milena.interop.clj/delete-topics-result
Ex. (topics-delete client ["some-topic" "another-topic"])
Deletes topics. @ client Admin client. @ topics List of topic names. @ opts (nilable) Cf. `milena.interop.java/delete-topics-options` => `milena.interop.clj/delete-topics-result` Ex. (topics-delete client ["some-topic" "another-topic"])
(topics-describe client topics)
(topics-describe client topics opts)
Describes some topics in the cluster.
@ client Admin client.
@ opts (nilable)
Cf. milena.interop.java/list-topics-options
=> Cf. milena.interop.clj/describe-topics-result
Ex. (topics-describe client ["some-topic" "another-topic"])
Describes some topics in the cluster. @ client Admin client. @ opts (nilable) Cf. `milena.interop.java/list-topics-options` => Cf. `milena.interop.clj/describe-topics-result` Ex. (topics-describe client ["some-topic" "another-topic"])
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close