Kafka Admin client, can be used to create, list, and delete topics, get consumer groups, etc.
This admin client is a wrapper around the java Admin client. See the API of the java admin client for a full description of the provided operations.
Typically constructed as:
val settings: AdminClientSettings = AdminClientSettings(bootstrapServers).withCredentials(...)
val adminClient = AdminClient.make(settings)
Unlike the java Admin client, this client waits until a write operation (e.g. creating or deleting a topic) completes. For most write operations this is done by polling the broker until we see the effect of the write operation. If after 5s the effect is still not seen, we assume the write operation succeeded but was undone by another write operation. For some operations where polling is difficult, we wait for 1s, assuming the operation completes within that time.
Attributes
- Companion
- object
- Source
- AdminClient.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Abstract methods
Alter offsets for the specified partitions and consumer group.
Creates access control lists (ACLs) which are bound to specific resources.
Creates access control lists (ACLs) which are bound to specific resources.
Attributes
- Source
- AdminClient.scala
Creates access control lists (ACLs) which are bound to specific resources async.
Creates access control lists (ACLs) which are bound to specific resources async.
Attributes
- Source
- AdminClient.scala
Add new partitions to a topic.
Create a single topic.
Create multiple topics.
Deletes access control lists (ACLs) according to the supplied filters.
Deletes access control lists (ACLs) according to the supplied filters.
Attributes
- Source
- AdminClient.scala
Deletes access control lists (ACLs) according to the supplied filters async.
Deletes access control lists (ACLs) according to the supplied filters async.
Attributes
- Source
- AdminClient.scala
Delete consumer groups.
Delete records.
Delete records.
Value parameters
- visibilitySleep
-
time to wait after getting a confirmation that the command was accepted by the kafka broker. This should be enough time for the operation to complete. Set to
Duration.Zeroif you don't care when the operation completes.
Attributes
- Source
- AdminClient.scala
Delete a single topic.
Delete multiple topics.
Attributes
- Source
- AdminClient.scala
Get the cluster authorized operations.
Get the cluster controller.
Get the cluster id.
Get the cluster nodes.
Get the configuration for the specified resources.
Get the configuration for the specified resources async.
Describe the specified consumer groups.
Describe the specified consumer groups.
Describe the log directories of the specified brokers
Describe the log directories of the specified brokers async
Describe the specified topics.
Incrementally update the configuration for the specified resources. Only supported by brokers with version 2.3.0 or higher. Use alterConfigs otherwise.
Incrementally update the configuration for the specified resources. Only supported by brokers with version 2.3.0 or higher. Use alterConfigs otherwise.
When configs contains an AlterConfigOpType.Append or an AlterConfigOpType.Subtract, visibilitySleep is used. Otherwise, polling is used to wait until the operation completes.
Value parameters
- visibilitySleep
-
time to wait after getting a confirmation that the command was accepted by the kafka broker. This should be enough time for the operation to complete. Set to
Duration.Zeroif you don't care when the operation completes.
Attributes
- Source
- AdminClient.scala
Incrementally update the configuration for the specified resources async. Only supported by brokers with version 2.3.0 or higher. Use alterConfigsAsync otherwise.
Incrementally update the configuration for the specified resources async. Only supported by brokers with version 2.3.0 or higher. Use alterConfigsAsync otherwise.
When configs contains an AlterConfigOpType.Append or an AlterConfigOpType.Subtract, visibilitySleep is used. Otherwise, polling is used to wait until the operation completes. This method still returns immediately with the outer task, sleeping/polling happens in the inner task.
Value parameters
- visibilitySleep
-
time to wait (in the inner task) after getting a confirmation that the command was accepted by the kafka broker. This should be enough time for the operation to complete. Set to
Duration.Zeroif you don't care when the operation completes.
Attributes
- Source
- AdminClient.scala
List Consumer Group offsets for the specified partitions.
Given a mapping of consumer group IDs and list of partitions, list the consumer group offsets available in the cluster for the specified consumer groups and partitions.
Given a mapping of consumer group IDs and list of partitions, list the consumer group offsets available in the cluster for the specified consumer groups and partitions.
Attributes
- Source
- AdminClient.scala
Given a mapping of consumer group IDs and list of partitions, list the consumer group offsets available in the cluster for the specified consumer groups and partitions.
Given a mapping of consumer group IDs and list of partitions, list the consumer group offsets available in the cluster for the specified consumer groups and partitions.
Attributes
- Source
- AdminClient.scala
List the consumer groups in the cluster.
List the groups in the cluster.
List offset for the specified partitions.
List offset for the specified partitions.
List the topics in the cluster.
Retrieves metrics for the underlying AdminClient
Remove all members from a consumer group.
Remove all members from a consumer group.
Value parameters
- visibilitySleep
-
time to wait after getting a confirmation that the command was accepted by the kafka broker. This should be enough time for the operation to complete. Set to
Duration.Zeroif you don't care when the operation completes.
Attributes
- Source
- AdminClient.scala
Remove the specified members from a consumer group.
Remove the specified members from a consumer group.
Value parameters
- visibilitySleep
-
time to wait after getting a confirmation that the command was accepted by the kafka broker. This should be enough time for the operation to complete. Set to
Duration.Zeroif you don't care when the operation completes.
Attributes
- Source
- AdminClient.scala
Concrete methods
Remove all members from a consumer group.
Remove all members from a consumer group.
Alias for removeAllMembersFromConsumerGroup with the default visibilitySleep.
Attributes
- Source
- AdminClient.scala