RdKafka\KafkaConsumer::__construct

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

RdKafka\KafkaConsumer::__constructConstructor

Description

public RdKafka\KafkaConsumer::__construct ( RdKafka\Conf $conf )

Parameters

conf (RdKafka\Conf)

The conf object must have group.id set to the consumer group to join.

Examples

Example #1 RdKafka\KafkaConsumer::__construct() example

<?php
$conf 
= new RdKafka\Conf();
$conf->set("group.id""myGroupID");

$kafkaConsumer = new RdKafka\KafkaConsumer($conf);
?>