AdminUtils

Provides a wrapper around important methods in Kafka's AdminUtils, namely

package

Default

Methods

__construct

__construct() 

Updates the configuration of the topic given by topicName. Configuration parameters are passed in as a Map (Key -> Value) of Strings.

changeTopicConfig( $arg0,  $arg1,  $arg2) : void

Arguments

$arg0

string

$arg1

array

$arg2

callable

Closes the underlying connection to Zookeeper. It is required to call the method for cleanup purposes if AdminUtils was not created with autoClose set to true.

close( $arg0) : void

Arguments

$arg0

callable

Create a new AdminUtils instance

create( $arg0,  $arg1,  $arg2 = null,  $arg3 = null,  $arg4 = null) : \io\vertx\jphp\kafka\admin\AdminUtils
static

param $vertx [Vertx] Vert.x instance to use param $zookeeperHosts [string] comma-separated list of Zookeeper server, e.g. localhost:2181,localhost:2182 create($vertx, $zookeeperHosts)

Create a new AdminUtils instance

param $vertx [Vertx] Vert.x instance to use param $zookeeperHosts [string] comma-separated list of Zookeeper server, e.g. localhost:2181,localhost:2182 param $autoClose [boolean] If set to true, the client will auto-close the connection after a command create($vertx, $zookeeperHosts, $autoClose)

Create a new AdminUtils instance

param $vertx [Vertx] Vert.x instance to use param $zookeeperHosts [string] comma-separated list of Zookeeper server, e.g. localhost:2181,localhost:2182 param $connectionTimeoutMs [integer] Maximum time in ms to wait for the client to connect to Zookeeper param $isSecure [boolean] If set to true, ZkUtils will perform security checks, i.e. ACL checks param $autoClose [boolean] If set to true, the client will auto-close the connection after a command create($vertx, $zookeeperHosts, $connectionTimeoutMs, $isSecure, $autoClose)

Arguments

$arg0

Vertx

$arg1

string

$arg2

boolean | integer

$arg3

boolean

$arg4

boolean

Response

\io\vertx\jphp\kafka\admin\AdminUtils

an instance of the AdminUtilWrapper

Creates a new Kafka topic on all Brokers managed by the given Zookeeper instance(s)

createTopic( $arg0,  $arg1,  $arg2,  $arg3,  $arg4 = null) : void

param $topicName [string] Name of the to-be-created topic param $partitionCount [integer] Number of partitions param $replicationFactor [integer] Number of replicates. Must be lower or equal to the number of available Brokers param $completionHandler [callable] vert.x callback createTopic($topicName, $partitionCount, $replicationFactor, $completionHandler)

Creates a new Kafka topic on all Brokers managed by the given Zookeeper instance(s). In contrast to @see @see \io\vertx\jphp\kafka\admin\AdminUtils::createTopic, one can pass in additional configuration parameters as a map (String -> String).

param $topicName [string] Name of the to-be-created topic param $partitionCount [integer] Number of partitions param $replicationFactor [integer] Number of replicates. Must be lower or equal to the number of available Brokers param $topicConfig [array] map with additional topic configuration parameters param $completionHandler [callable] vert.x callback createTopic($topicName, $partitionCount, $replicationFactor, $topicConfig, $completionHandler)

Arguments

$arg0

string

$arg1

integer

$arg2

integer

$arg3

callable | array

$arg4

callable

Delete the Kafka topic given by the topicName.

deleteTopic( $arg0,  $arg1) : void

Arguments

$arg0

string

$arg1

callable

Checks if the Kafka topic given by topicName does exist.

topicExists( $arg0,  $arg1) : void

Arguments

$arg0

string

$arg1

callable