RdKafka::poll

(PECL rdkafka >= 0.9.1)

RdKafka::pollPoll for events

Description

public RdKafka::poll ( integer $timeout_ms ) : void

Polls for events, cause application provided callbacks to be called.

Note:

An application using a sub-class of RdKafka should make sure to call poll() at regular intervals to serve any queued callbacks waiting to be called.

Events:

Parameters

timeout_ms (integer)

Specifies the maximum amount of time (in milliseconds) that the call will block waiting for events. For non-blocking calls, provide 0 as timeout_ms. To wait indefinately for an event, provide -1.

Return Values

Returns the number of events served.