PHP 클래스 Kafka\Client

저자: $_SWANBR_AUTHOR_$ +------------------------------------------------------------------------------
파일 보기 프로젝트 열기: nmred/kafka-php 1 사용 예제들

공개 메소드들

메소드 설명
__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

비공개 메소드들

메소드 설명
updateStreamOptions ( )

메소드 상세

__construct() 공개 메소드

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

freeStream() 공개 메소드

free stream pool
public freeStream ( string $key ) : void
$key string
리턴 void

getBrokers() 공개 메소드

get broker server
public getBrokers ( ) : array
리턴 array

getHostByPartition() 공개 메소드

get broker host by topic partition
public getHostByPartition ( string $topicName, integer $partitionId ) : string
$topicName string
$partitionId integer
리턴 string

getStream() 공개 메소드

get broker broker connect
public getStream ( string $host, null $lockKey = null ) : array
$host string
$lockKey null
리턴 array

getStreamOption() 공개 메소드

public getStreamOption ( $name ) : mixed
$name - name of option
리턴 mixed

getTopicDetail() 공개 메소드

get topic detail info
public getTopicDetail ( string $topicName ) : array
$topicName string
리턴 array

getZooKeeper() 공개 메소드

get kafka zookeeper object
public getZooKeeper ( ) : ZooKeeper
리턴 ZooKeeper

setStreamOption() 공개 메소드

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

setStreamOptions() 공개 메소드

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