(PECL rdkafka >= 4.0.0)
RdKafka\ConsumerTopic::consumeBatch — Consume a batch of messages from a partition
$partition
, integer $timeout_ms
, integer $batch_size
) : array
Consume a batch of messages from partition
.
Consumer must have been previously started with RdKafka\ConsumerTopic::consumeStart().
partition
(integer)The partition to consume
timeout_ms
The maximum amount of time to wait for a batch to be received.
batch_size
The batch size of messages to be returned.
Returns an array of RdKafka\Message or NULL
on timeout.