Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions stubs/RdKafka/ConsumerTopic.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,15 @@ public function offsetStore($partition, $offset)
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)
{
}
}
26 changes: 26 additions & 0 deletions stubs/RdKafka/KafkaConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ 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
*
Expand Down Expand Up @@ -144,4 +154,20 @@ public function getOffsetPositions($topics)
public function close()
{
}

/**
* @param TopicPartition[] $topic_partitions
* @return TopicPartition[]
*/
public function pausePartitions($topic_partitions)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find it in the docs:
https://arnaud.le-blanc.net/php-rdkafka-doc/phpdoc/class.rdkafka-kafkaconsumer.html

Is that something that was introduced recently and the official docs hasn't been updated yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
}

/**
* @param TopicPartition[] $topic_partitions
* @return TopicPartition[]
*/
public function resumePartitions($topic_partitions)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
}
}
11 changes: 0 additions & 11 deletions stubs/RdKafka/KafkaConsumerTopic.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,4 @@ class KafkaConsumerTopic extends Topic
public function offsetStore($partition, $offset)
{
}

/**
* @param int $partition
* @param int $timeout_ms
* @param callable $callback
*
* @return void
*/
public function consumeCallback($partition, $timeout_ms, callable $callback)
{
}
}
10 changes: 10 additions & 0 deletions stubs/RdKafka/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ class Message
*/
public $payload;

/**
* @var int|null
*/
public $len;

/**
* @var string|null
*/
Expand All @@ -44,6 +49,11 @@ class Message
*/
public $headers;

/**
* @var string|null
*/
public $opaque;

/**
* @return string
*/
Expand Down