*/ public function dump() { } /** * @param string $name * @param string $value * * @return void */ public function set($name, $value) { } /** * @param TopicConf $topic_conf * * @return void * @deprecated Set default topic settings normally like global configuration settings. * */ public function setDefaultTopicConf(TopicConf $topic_conf) { } /** * @param callable $callback * * @return void */ public function setDrMsgCb(callable $callback) { } /** * @param callable $callback * * @return void */ public function setErrorCb(callable $callback) { } /** * @param callable $callback * * @return void */ public function setRebalanceCb(callable $callback) { } /** * @param callable $callback * * @return void */ public function setStatsCb(callable $callback) { } /** * @param callable $callback * * @return void */ public function setConsumeCb(callable $callback) { } /** * @param callable $callback * * @return void */ public function setOffsetCommitCb(callable $callback) { } /** * @param callable $callback * * @return void */ public function setLogCb(callable $callback) { } } class Consumer extends \RdKafka { /** * @param Conf $conf */ public function __construct(Conf $conf = null) { } /** * @param string $topic_name * @param TopicConf $topic_conf * * @return ConsumerTopic */ public function newTopic($topic_name, TopicConf $topic_conf = null) { } /** * @return Queue */ public function newQueue() { } } class ConsumerTopic extends Topic { private function __construct() { } /** * @param int $partition * @param int $timeout_ms * * @return Message|null */ public function consume($partition, $timeout_ms) { } /** * @param int $partition * @param int $offset * @param Queue $queue * * @return void */ public function consumeQueueStart($partition, $offset, Queue $queue) { } /** * @param int $partition * @param int $offset * * @return void */ public function consumeStart($partition, $offset) { } /** * @param int $partition * * @return void */ public function consumeStop($partition) { } /** * @param int $partition * @param int $offset * * @return void */ public function offsetStore($partition, $offset) { } /** * @param int $partition * @param int $timeout_ms * @param int $batch_size * * @return array * @throws \InvalidArgumentException * @throws Exception */ public function consumeBatch($partition, $timeout_ms, $batch_size) { } /** * @param int $partition * @param int $timeout_ms * @param callable $callback * * @return void */ public function consumeCallback($partition, $timeout_ms, callable $callback) { } } class Exception extends \Exception { } class KafkaConsumer { /** * @param Conf $conf */ public function __construct(Conf $conf) { } /** * @param TopicPartition[] $topic_partitions * * @return void * @throws Exception */ public function assign($topic_partitions = null) { } /** * @param null|Message|TopicPartition[] $message_or_offsets * * @return void * @throws Exception */ public function commit($message_or_offsets = null) { } /** * @param string $message_or_offsets * * @return void * @throws Exception */ public function commitAsync($message_or_offsets = null) { } /** * @param int $timeout_ms * * @return Message * @throws \InvalidArgumentException * @throws Exception */ public function consume($timeout_ms) { } /** * @return TopicPartition[] * @throws Exception */ public function getAssignment() { } /** * @param bool $all_topics * @param KafkaConsumerTopic|null $only_topic * @param int $timeout_ms * * @return Metadata * @throws Exception */ public function getMetadata($all_topics, $only_topic, $timeout_ms) { } /** * @return array */ public function getSubscription() { } /** * @param string $topic_name * @param TopicConf $topic_conf * * @return KafkaConsumerTopic */ public function newTopic($topic_name, TopicConf $topic_conf = null) { } /** * @param array $topics * * @return void * @throws Exception */ public function subscribe($topics) { } /** * @return void * @throws Exception */ public function unsubscribe() { } /** * @param TopicPartition[] $topicPartitions * @param int $timeout_ms Timeout in milliseconds * * @return TopicPartition[] * @throws Exception */ public function getCommittedOffsets($topicPartitions, $timeout_ms) { } /** * @param array $topicPartitions * @param int $timeout_ms * @return array */ public function offsetsForTimes($topicPartitions, $timeout_ms) { } /** * @param string $topic * @param int $partition * @param int $low * @param int $high * @param int $timeout_ms */ public function queryWatermarkOffsets($topic, $partition, &$low, &$high, $timeout_ms) { } /** * @param array $topics * * @return array * @throws Exception */ public function getOffsetPositions($topics) { } /** * @return void */ public function close() { } /** * @param TopicPartition[] $topic_partitions * @return TopicPartition[] */ public function pausePartitions($topic_partitions) { } /** * @param TopicPartition[] $topic_partitions * @return TopicPartition[] */ public function resumePartitions($topic_partitions) { } } class KafkaConsumerTopic extends Topic { /** * @param int $partition * @param int $offset * * @return void */ public function offsetStore($partition, $offset) { } } class KafkaErrorException extends \Exception { /** * @param string $message * @param int $code * @param string $errorString * @param boolean $isFatal * @param boolean $isRetriable * @param boolean $transactionRequiresAbort */ public function __construct($message, $code, $errorString, $isFatal, $isRetriable, $transactionRequiresAbort) { parent::__construct($message, $code); } /** * @returns string */ public function getErrorString() { } /** * @returns boolean */ public function isFatal() { } /** * @returns boolean */ public function isRetriable() { } /** * @returns boolean */ public function transactionRequiresAbort() { } } class Message { /** * @var int */ public $err; /** * @var string */ public $topic_name; /** * @var int */ public $partition; /** * @var string|null */ public $payload; /** * @var int|null */ public $len; /** * @var string|null */ public $key; /** * @var int */ public $offset; /** * @var int */ public $timestamp; /** * @var array|null */ public $headers; /** * @var string|null */ public $opaque; /** * @return string */ public function errstr() { } } class Metadata { /** * @return \RdKafka\Metadata\Collection|\RdKafka\Metadata\Broker[] */ public function getBrokers() { } /** * @return \RdKafka\Metadata\Collection|\RdKafka\Metadata\Topic[] */ public function getTopics() { } /** * @return int */ public function getOrigBrokerId() { } /** * @return string */ public function getOrigBrokerName() { } } class Producer extends \RdKafka { /** * @param Conf $conf */ public function __construct(Conf $conf = null) { } /** * @param string $topic_name * @param TopicConf $topic_conf * * @return ProducerTopic */ public function newTopic($topic_name, TopicConf $topic_conf = null) { } /** * @param int $timeoutMs * * @return void * @throws KafkaErrorException */ public function initTransactions(int $timeoutMs) { } /** * @return void * @throws KafkaErrorException */ public function beginTransaction() { } /** * @param int $timeoutMs * * @return void * @throws KafkaErrorException */ public function commitTransaction(int $timeoutMs) { } /** * @param int $timeoutMs * * @return void * @throws KafkaErrorException */ public function abortTransaction(int $timeoutMs) { } } class ProducerTopic extends Topic { private function __construct() { } /** * @param int $partition * @param int $msgflags * @param string $payload * @param string $key * * @return void * @throws Exception */ public function produce($partition, $msgflags, $payload, $key = null) { } /** * @param int $partition * @param int $msgflags * @param string $payload * @param string|null $key * @param array|null $headers * @param int $timestamp_ms * * @throws Exception */ public function producev($partition, $msgflags, $payload, $key = null, $headers = null, $timestamp_ms = null) { } } class Queue { private function __construct() { } /** * @param string $timeout_ms * * @return Message|null */ public function consume($timeout_ms) { } } abstract class Topic { /** * @return string */ public function getName() { } } /** * Configuration reference: https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md */ class TopicConf { /** * @return array */ public function dump() { } /** * @param string $name * @param string $value * * @return void */ public function set($name, $value) { } /** * @param int $partitioner * * @return void */ public function setPartitioner($partitioner) { } } class TopicPartition { /** * @param string $topic * @param int $partition * @param int $offset */ public function __construct($topic, $partition, $offset = null) { } /** * @return int */ public function getOffset() { } /** * @return int */ public function getPartition() { } /** * @return string */ public function getTopic() { } /** * @param int $offset * * @return void */ public function setOffset($offset) { } /** * @param int $partition * * @return void */ public function setPartition($partition) { } /** * @param string $topic_name * * @return void */ public function setTopic($topic_name) { } } } namespace RdKafka\Metadata { class Broker { /** * @return int */ public function getId() { } /** * @return string */ public function getHost() { } /** * @return int */ public function getPort() { } } class Collection implements \Iterator, \Countable { /** * @return mixed */ public function current() { } /** * @return void */ public function next() { } /** * @return mixed */ public function key() { } /** * @return boolean */ public function valid() { } /** * @return void */ public function rewind() { } /** * @return int */ public function count() { } } class Partition { /** * @return int */ public function getId() { } /** * @return mixed */ public function getErr() { } /** * @return mixed */ public function getLeader() { } /** * @return mixed */ public function getReplicas() { } /** * @return mixed */ public function getIsrs() { } } class Topic { /** * @return string */ public function getTopic() { } /** * @return Partition[] */ public function getPartitions() { } /** * @return mixed */ public function getErr() { } } }