RdKafka\Producer::beginTransaction

(PECL rdkafka >= 4.1.0, librdkafka >= 1.4.0)

RdKafka\Producer::beginTransactionBegin a transaction

Description

public RdKafka\Producer::beginTransaction ( void ) : void

RdKafka\Producer::initTransactions() must have been called successfully (once) before this function is called. Any messages produced, offsets sent, etc, after the successful return of this function will be part of the transaction and committed or aborted atomatically. Finish the transaction by calling RdKafka\Producer::commitTransaction() or abort the transaction by calling RdKafka\Producer::abortTransaction().

Return Values

In case of success returns NULL, in case of error a RdKafka\KafkaErrorException will be thrown.