PHP Class Kafka\Client

Author: $_SWANBR_AUTHOR_$ +------------------------------------------------------------------------------
Afficher le fichier Open project: nmred/kafka-php Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( kafka\ClusterMetaData $metadata ) __construct
freeStream ( string $key ) : void free stream pool
getBrokers ( ) : array get broker server
getHostByPartition ( string $topicName, integer $partitionId ) : string get broker host by topic partition
getStream ( string $host, null $lockKey = null ) : array get broker broker connect
getStreamOption ( $name ) : mixed
getTopicDetail ( string $topicName ) : array get topic detail info
getZooKeeper ( ) : ZooKeeper get kafka zookeeper object
setStreamOption ( $name, $value )
setStreamOptions ( array $options = [] ) update stream options

Private Methods

Méthode Description
updateStreamOptions ( )

Method Details

__construct() public méthode

__construct
public __construct ( kafka\ClusterMetaData $metadata )
$metadata kafka\ClusterMetaData

freeStream() public méthode

free stream pool
public freeStream ( string $key ) : void
$key string
Résultat void

getBrokers() public méthode

get broker server
public getBrokers ( ) : array
Résultat array

getHostByPartition() public méthode

get broker host by topic partition
public getHostByPartition ( string $topicName, integer $partitionId ) : string
$topicName string
$partitionId integer
Résultat string

getStream() public méthode

get broker broker connect
public getStream ( string $host, null $lockKey = null ) : array
$host string
$lockKey null
Résultat array

getStreamOption() public méthode

public getStreamOption ( $name ) : mixed
$name - name of option
Résultat mixed

getTopicDetail() public méthode

get topic detail info
public getTopicDetail ( string $topicName ) : array
$topicName string
Résultat array

getZooKeeper() public méthode

get kafka zookeeper object
public getZooKeeper ( ) : ZooKeeper
Résultat ZooKeeper

setStreamOption() public méthode

public setStreamOption ( $name, $value )
$name - name of stream option
$value - value for option

setStreamOptions() public méthode

update stream options
public setStreamOptions ( array $options = [] )
$options array