Skip to content

Class Producer

Class \RdKafka\Producer

Methods

__construct()

public __construct ( 
    ?\RdKafka\Conf $conf = null
 ): 
Parameters
conf ?\RdKafka\Conf

abortTransaction()

public abortTransaction ( 
    int $timeout_ms
 ): void
Parameters
timeout_ms int

addBrokers()

public addBrokers ( 
    string $broker_list
 ): int
Parameters
broker_list string
Returns
int

beginTransaction()

public beginTransaction (  ): void

commitTransaction()

public commitTransaction ( 
    int $timeout_ms
 ): void
Parameters
timeout_ms int

flush()

public flush ( 
    int $timeout_ms
 ): int
Parameters
timeout_ms int
Returns
int

getOutQLen()

public getOutQLen (  ): int
Returns
int

initTransactions()

public initTransactions ( 
    int $timeout_ms
 ): void

Initializing transactions must be done before producing and starting a transaction

Parameters
timeout_ms int

newTopic()

public newTopic ( 
    string $topic_name, 
    ?\RdKafka\TopicConf $topic_conf = null
 ): \RdKafka\ProducerTopic
Parameters
topic_name string
topic_conf ?\RdKafka\TopicConf
Returns
\RdKafka\ProducerTopic

poll()

public poll ( 
    int $timeout_ms
 ): int
Parameters
timeout_ms int
Returns
int

purge()

public purge ( 
    int $purge_flags
 ): int
Parameters
purge_flags int
Returns
int

Test Coverage ๐Ÿ’›

  • ๐Ÿ’› Lines: 78.95% (15 / 19)
  • ๐Ÿงก Methods: 63.64% (7 / 11)