These are chat archives for arnaud-lb/php-rdkafka

30th
Aug 2017
Joe Green
@joegreen88
Aug 30 2017 10:35
I'm having some debate with my team about the use for poll() in the producer
AFAIK we need to poll for delivery confirmation
also, from this example https://arnaud-lb.github.io/php-rdkafka/phpdoc/rdkafka.examples-producer.html I get the impression that the poll(0) is also needed to send the initial produce request
is this true? How do we need to use the poll
Is it only for triggering delivery report callback
Magnus Edenhill
@edenhill
Aug 30 2017 10:42
@joegreen88 it is only for triggering delivery reports (which will be queued up internally waiting for the next poll() call). One thing to note though is that the queue.buffering.max.messages property accounts both for messages waiting to be produced, in-flight, as well as the delivery reports - it is the same message after all. This means that if you dont call poll(), the internal queue will eventually fill up and you will not be allowed to produce any more messages.
Joe Green
@joegreen88
Aug 30 2017 10:43
hence the poll(0). Got it, thanks :)