KafkaAdminClient

fs2.kafka.KafkaAdminClient
See theKafkaAdminClient companion object
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.

Attributes

Companion
object
Source
KafkaAdminClient.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def abortTransaction(topicPartition: TopicPartition, producerId: Long, producerEpoch: Short, coordinationEpoch: Int): F[Unit]

Forcefully abort a transaction which is open on a topic partition.

Forcefully abort a transaction which is open on a topic partition.

Attributes

Source
KafkaAdminClient.scala
def addRaftVoter(voterId: Int, voterDirectoryId: Uuid, endpoints: Set[RaftVoterEndpoint], clusterId: Option[String]): F[Unit]

Add a new voter node to the KRaft metadata quorum.

Add a new voter node to the KRaft metadata quorum.

Attributes

Source
KafkaAdminClient.scala
def alterClientQuotas[G[_] : Foldable](entries: G[ClientQuotaAlteration]): F[Unit]

Alters client quota configurations with the specified alterations.

Alters client quota configurations with the specified alterations.

Attributes

Source
KafkaAdminClient.scala
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.

Attributes

Source
KafkaAdminClient.scala
def alterConfigs[G[_] : Foldable](configs: Map[ConfigResource, G[AlterConfigOp]], validateOnly: Boolean): F[Unit]

Incrementally update the configuration for the specified resources.

Incrementally update the configuration for the specified resources.

Attributes

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

Alters offsets for the specified group.

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

Attributes

Source
KafkaAdminClient.scala
def alterPartitionReassignments(reassignments: Map[TopicPartition, Option[NewPartitionReassignment]]): F[Unit]

Change the reassignments for one or more partitions.

Change the reassignments for one or more partitions.

Attributes

Source
KafkaAdminClient.scala
def alterReplicaLogDirs(replicaAssignment: Map[TopicPartitionReplica, String]): F[Unit]

Change the log directory for the specified replicas.

Change the log directory for the specified replicas.

Attributes

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

Creates the specified ACLs

Creates the specified ACLs

Attributes

Source
KafkaAdminClient.scala
def createDelegationToken(renewers: List[KafkaPrincipal], owner: Option[KafkaPrincipal], maxLifeTime: Option[FiniteDuration]): F[DelegationToken]

Creates a delegation token

Creates a delegation token

Attributes

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

Attributes

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

Creates the specified topic.

Creates the specified topic.

Attributes

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

Creates the specified topics.

Creates the specified topics.

Attributes

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

Attributes

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

Delete committed offsets for a set of partitions in a consumer group.

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.

Attributes

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.

Attributes

Source
KafkaAdminClient.scala
def deleteRecords(recordsToDelete: Map[TopicPartition, RecordsToDelete]): F[Unit]

Delete records whose offset is smaller than the given offset of the corresponding partition.

Delete records whose offset is smaller than the given offset of the corresponding partition.

Attributes

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

Deletes the specified topic.

Deletes the specified topic.

Attributes

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

Deletes the specified topics.

Deletes the specified topics.

Attributes

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

Attributes

Source
KafkaAdminClient.scala
def describeClientQuotas(filter: ClientQuotaFilter): F[Map[ClientQuotaEntity, Map[String, Double]]]

Describes all entities matching the provided filter that have at least one client quota configuration value defined.

Describes all entities matching the provided filter that have at least one client quota configuration value defined.

Attributes

Source
KafkaAdminClient.scala

Describes the cluster.

Describes the cluster. Returns nodes using:

describeCluster.nodes

or the controller node using:

describeCluster.controller

or the cluster ID using the following.

describeCluster.clusterId

Attributes

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.

Attributes

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.

Attributes

Source
KafkaAdminClient.scala
def describeDelegationToken[G[_] : Foldable](owners: Option[G[KafkaPrincipal]]): F[List[DelegationToken]]

Describe the delegation tokens.

Describe the delegation tokens.

Attributes

Source
KafkaAdminClient.scala
def describeFeatures: F[FeatureMetadata]

Describes finalized as well as supported features.

Describes finalized as well as supported features.

Attributes

Source
KafkaAdminClient.scala
def describeLogDirs[G[_] : Foldable](brokers: G[Int]): F[Map[Int, Map[String, LogDirDescription]]]

Query the information of all log directories on the given set of brokers.

Query the information of all log directories on the given set of brokers.

Attributes

Source
KafkaAdminClient.scala
def describeMetadataQuorum: F[QuorumInfo]

Describes the state of the metadata quorum.

Describes the state of the metadata quorum.

Attributes

Source
KafkaAdminClient.scala
def describeProducers[G[_] : Foldable](partitions: G[TopicPartition], brokerId: Option[Int]): F[Map[TopicPartition, PartitionProducerState]]

Describe producer state on a set of topic partitions.

Describe producer state on a set of topic partitions.

Attributes

Source
KafkaAdminClient.scala
def describeReplicaLogDirs[G[_] : Foldable](replicas: G[TopicPartitionReplica]): F[Map[TopicPartitionReplica, ReplicaLogDirInfo]]

Query the replica log directory information for the specified replicas.

Query the replica log directory information for the specified replicas.

Attributes

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.

Attributes

Source
KafkaAdminClient.scala
def describeTransactions[G[_] : Foldable](transactionalIds: G[String]): F[Map[String, TransactionDescription]]

Describe the state of a set of transactional IDs from the respective transaction coordinators, which are dynamically discovered.

Describe the state of a set of transactional IDs from the respective transaction coordinators, which are dynamically discovered.

Attributes

Source
KafkaAdminClient.scala
def describeUserScramCredentials(users: Option[List[String]]): F[Map[String, UserScramCredentialsDescription]]

Describe all SASL/SCRAM credentials.

Describe all SASL/SCRAM credentials.

Attributes

Source
KafkaAdminClient.scala
def electLeaders(electionType: ElectionType, partitions: Set[TopicPartition]): F[Unit]

Elect a replica as leader for topic partitions.

Elect a replica as leader for topic partitions.

Attributes

Source
KafkaAdminClient.scala
def expireDelegationToken(hmac: Chunk[Byte], expiryTime: Option[FiniteDuration]): F[Instant]

Expire a delegation token, returning the expiry timestamp.

Expire a delegation token, returning the expiry timestamp.

Attributes

Source
KafkaAdminClient.scala
def fenceProducers[G[_] : Foldable](transactionalIds: G[String]): F[Unit]

Fence out all active producers that use any of the provided transactional IDs.

Fence out all active producers that use any of the provided transactional IDs.

Attributes

Source
KafkaAdminClient.scala
def listConfigResources: F[List[ConfigResource]]

Attributes

Source
KafkaAdminClient.scala

Lists consumer group offsets.

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

Attributes

Source
KafkaAdminClient.scala

Lists consumer groups.

Lists consumer groups. Returns group ids using:

listConsumerGroups.groupIds

or ConsumerGroupListings using the following.

listConsumerGroups.listings

Attributes

Source
KafkaAdminClient.scala
def listOffsets(topicPartitionOffsets: Map[TopicPartition, OffsetSpec], isolationLevel: IsolationLevel): F[Map[TopicPartition, ListOffsetsResultInfo]]

List offset for the specified partitions and isolation level.

List offset for the specified partitions and isolation level.

Attributes

Source
KafkaAdminClient.scala
def listPartitionReassignments(partitionsFilter: Option[Set[TopicPartition]]): F[Map[TopicPartition, PartitionReassignment]]

List the current reassignments for the given partitions.

List the current reassignments for the given partitions.

Attributes

Source
KafkaAdminClient.scala

Lists topics.

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

Attributes

Source
KafkaAdminClient.scala
def listTransactions(states: Option[Set[TransactionState]], producerIds: Option[Set[Long]], duration: Option[Long]): F[List[TransactionListing]]

List active transactions in the cluster.

List active transactions in the cluster.

Attributes

Source
KafkaAdminClient.scala
def metrics: F[Map[MetricName, Metric]]

Get the metrics kept by the admin client.

Get the metrics kept by the admin client.

Attributes

Source
KafkaAdminClient.scala
def removeMembersFromConsumerGroup[G[_] : Foldable](groupId: String, members: G[MemberToRemove], reason: Option[String]): F[Unit]

Remove members from the consumer group by given member identities.

Remove members from the consumer group by given member identities.

Attributes

Source
KafkaAdminClient.scala
def removeRaftVoter(voterId: Int, voterDirectoryId: Uuid, clusterId: Option[String]): F[Unit]

Remove a voter node from the KRaft metadata quorum.

Remove a voter node from the KRaft metadata quorum.

Attributes

Source
KafkaAdminClient.scala
def renewDelegationToken(hmac: Chunk[Byte], renewTime: Option[FiniteDuration]): F[Instant]

Renew a delegation token and return the expiry timestamp.

Renew a delegation token and return the expiry timestamp.

Attributes

Source
KafkaAdminClient.scala
def updateFeatures(features: Map[String, FeatureUpdate], validateOnly: Boolean): F[Unit]

Applies specified updates to finalized features.

Applies specified updates to finalized features.

Attributes

Source
KafkaAdminClient.scala