AdminOps

io.github.embeddedkafka.ops.AdminOps

Trait for admin-level actions on Kafka components. Relies on org.apache.kafka.clients.admin.AdminClient.

Type parameters

C

an EmbeddedKafkaConfig

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def createCustomTopic(topic: String, topicConfig: Map[String, String], partitions: Int, replicationFactor: Int)(implicit config: C): Try[Unit]

Creates a topic with a custom configuration.

Creates a topic with a custom configuration.

Value parameters

config

an implicit EmbeddedKafkaConfig

partitions

number of partitions

replicationFactor

replication factor

topic

the topic name

topicConfig

per topic configuration Map

Attributes

def deleteTopics(topics: List[String])(implicit config: C): Try[Unit]

Either deletes or marks for deletion a list of topics.

Either deletes or marks for deletion a list of topics.

Value parameters

config

an implicit EmbeddedKafkaConfig

topics

the topic names

Attributes

protected def withAdminClient[T](body: AdminClient => T)(implicit config: C): Try[T]

Creates an AdminClient, then executes the body passed as a parameter.

Creates an AdminClient, then executes the body passed as a parameter.

Value parameters

body

the function to execute

config

an implicit EmbeddedKafkaConfig

Attributes

Concrete fields

protected val adminClientCloseTimeout: FiniteDuration
protected val topicCreationTimeout: FiniteDuration
protected val topicDeletionTimeout: FiniteDuration