The RdKafka\KafkaConsumer class

(PECL rdkafka >= 1.0.0, librdkafka >= 0.9)

Introduction

This is the High-level KafkaConsumer with support for automatic partition assignment/revocation (requires Kafka >= 0.9).

Class synopsis

RdKafka\KafkaConsumer {
/* Methods */
public assign ([ array $topic_partitions = NULL ] ) : void
public close ( void ) : void
public commit ([ mixed $message_or_offsets = NULL ] ) : void
public commitAsync ([ string $message_or_offsets = NULL ] ) : void
public consume ( int $timeout_ms ) : RdKafka\Message
public getAssignment ( void ) : array
public getCommittedOffsets ( array $topics , int $timeout_ms ) : array
public RdKafka\Metadata getMetadata ( bool $all_topics , RdKafka\KafkaConsumerTopic|null $only_topic , int $timeout_ms )
public getOffsetPositions ( array $topics ) : array
public getSubscription ( void ) : array
public RdKafka\Topic newTopic ( string $topic_name [, RdKafka\TopicConf $topic_conf = NULL ] )
public offsetsForTimes ( array $topicPartitions , integer $timeout_ms ) : array
public queryWatermarkOffsets ( string $topic , integer $partition , integer &$low , integer &$high , integer $timeout_ms ) : void
public subscribe ( array $topics ) : void
public unsubscribe ( void ) : ReturnType
}

Table of Contents