(PECL rdkafka >= 0.9.1)
RdKafka::poll — Poll for events
$timeout_ms
) : voidPolls 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:
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.
Returns the number of events served.