(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_msThe maximum amount of time to wait for a batch to be received.
batch_sizeThe batch size of messages to be returned.
Returns an array of RdKafka\Message or NULL on timeout.