← ZIO Kafka docs

zio.kafka.admin

package zio.kafka.admin

Members list

Type members

Classlikes

trait AdminClient

Kafka Admin client, can be used to create, list, and delete topics, get consumer groups, etc.

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
Supertypes
class Object
trait Matchable
class Any
object AdminClient

Attributes

Companion
trait
Source
AdminClient.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class AdminClientSettings(closeTimeout: Duration, properties: Map[String, AnyRef])

Settings for the admin client.

Settings for the admin client.

To stay source compatible with future releases, you are recommended to construct the settings as follows:

 AdminClientSettings(bootstrapServers)
   .withCredentials(...)
   .withProperty(...)
   .... etc.

Attributes

Companion
object
Source
AdminClientSettings.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
AdminClientSettings.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type