KafkaAdminClient

sealed abstract class KafkaAdminClient[F[_]]

KafkaAdminClient represents an admin client for Kafka, which is able to describe queries about topics, consumer groups, offsets, and other entities related to Kafka.

Use KafkaAdminClient.resource or KafkaAdminClient.stream to create an instance.

Companion:
object
Source:
KafkaAdminClient.scala
class Object
trait Matchable
class Any

Value members

Abstract methods

def alterConfigs[G[_]](configs: Map[ConfigResource, G[AlterConfigOp]])(implicit G: Foldable[G]): F[Unit]

Updates the configuration for the specified resources.

Updates the configuration for the specified resources.

Source:
KafkaAdminClient.scala
def alterConsumerGroupOffsets(groupId: String, offsets: Map[TopicPartition, OffsetAndMetadata]): F[Unit]

Alters offsets for the specified group. In order to succeed, the group must be empty.

Alters offsets for the specified group. In order to succeed, the group must be empty.

Source:
KafkaAdminClient.scala
def createAcls[G[_]](acls: G[AclBinding])(implicit G: Foldable[G]): F[Unit]

Creates the specified ACLs

Creates the specified ACLs

Source:
KafkaAdminClient.scala
def createPartitions(newPartitions: Map[String, NewPartitions]): F[Unit]

Increase the number of partitions for different topics

Increase the number of partitions for different topics

Source:
KafkaAdminClient.scala
def createTopic(topic: NewTopic): F[Unit]

Creates the specified topic.

Creates the specified topic.

Source:
KafkaAdminClient.scala
def createTopics[G[_]](topics: G[NewTopic])(implicit G: Foldable[G]): F[Unit]

Creates the specified topics.

Creates the specified topics.

Source:
KafkaAdminClient.scala
def deleteAcls[G[_]](filters: G[AclBindingFilter])(implicit G: Foldable[G]): F[Unit]

Deletes ACLs based on specified filters

Deletes ACLs based on specified filters

Source:
KafkaAdminClient.scala
def deleteConsumerGroupOffsets(groupId: String, partitions: Set[TopicPartition]): F[Unit]

Delete committed offsets for a set of partitions in a consumer group. This will succeed at the partition level only if the group is not actively subscribed to the corresponding topic.

Delete committed offsets for a set of partitions in a consumer group. This will succeed at the partition level only if the group is not actively subscribed to the corresponding topic.

Source:
KafkaAdminClient.scala
def deleteConsumerGroups[G[_]](groupIds: G[String])(implicit G: Foldable[G]): F[Unit]

Delete consumer groups from the cluster.

Delete consumer groups from the cluster.

Source:
KafkaAdminClient.scala
def deleteTopic(topic: String): F[Unit]

Deletes the specified topic.

Deletes the specified topic.

Source:
KafkaAdminClient.scala
def deleteTopics[G[_]](topics: G[String])(implicit G: Foldable[G]): F[Unit]

Deletes the specified topics.

Deletes the specified topics.

Source:
KafkaAdminClient.scala
def describeAcls(filter: AclBindingFilter): F[List[AclBinding]]

Describes the ACLs based on the specified filters, returning a List of AclBinding entries matched

Describes the ACLs based on the specified filters, returning a List of AclBinding entries matched

Source:
KafkaAdminClient.scala

Describes the cluster. Returns nodes using:

Describes the cluster. Returns nodes using:

describeCluster.nodes

or the controller node using:

describeCluster.controller

or the cluster ID using the following.

describeCluster.clusterId
Source:
KafkaAdminClient.scala
def describeConfigs[G[_]](resources: G[ConfigResource])(implicit G: Foldable[G]): F[Map[ConfigResource, List[ConfigEntry]]]

Describes the configurations for the specified resources.

Describes the configurations for the specified resources.

Source:
KafkaAdminClient.scala
def describeConsumerGroups[G[_]](groupIds: G[String])(implicit G: Foldable[G]): F[Map[String, ConsumerGroupDescription]]

Describes the consumer groups with the specified group ids, returning a Map with group ids as keys, and ConsumerGroupDescriptions as values.

Describes the consumer groups with the specified group ids, returning a Map with group ids as keys, and ConsumerGroupDescriptions as values.

Source:
KafkaAdminClient.scala
def describeTopics[G[_]](topics: G[String])(implicit G: Foldable[G]): F[Map[String, TopicDescription]]

Describes the topics with the specified topic names, returning a Map with topic names as keys, and TopicDescriptions as values.

Describes the topics with the specified topic names, returning a Map with topic names as keys, and TopicDescriptions as values.

Source:
KafkaAdminClient.scala

Lists consumer group offsets. Returns offsets per topic-partition using:

Lists consumer group offsets. Returns offsets per topic-partition using:

listConsumerGroupOffsets(groupId)
 .partitionsToOffsetAndMetadata

or only offsets for specified topic-partitions using the following.

listConsumerGroupOffsets(groupId)
 .forPartitions(topicPartitions)
 .partitionsToOffsetAndMetadata
Source:
KafkaAdminClient.scala

Lists consumer groups. Returns group ids using:

Lists consumer groups. Returns group ids using:

listConsumerGroups.groupIds

or ConsumerGroupListings using the following.

listConsumerGroups.listings
Source:
KafkaAdminClient.scala

Lists topics. Returns topic names using:

Lists topics. Returns topic names using:

listTopics.names

or TopicListings using:

listTopics.listings

or a Map of topic names to TopicListings using the following.

listTopics.namesToListings

If you want to include internal topics, first use includeInternal.

listTopics.includeInternal.listings
Source:
KafkaAdminClient.scala