These are chat archives for arnaud-lb/php-rdkafka
Is there any way to ensure that the messages produced have been received by the broker ?
By default, librdkafka won’t give up trying to send a message until it’s actually sent. So, doing nothing special will ensure that the message is eventually sent.
If you need to know exactly when it has been successfuly sent, you need delivery report callbacks, as described at https://github.com/edenhill/librdkafka/wiki/Sync-producer
Note that delivery report callbacks are yet to be implemented in php-rdkafka
Great! Did you tried exit()'ing in the error callback ?
I did, but it ends up segfaulting most of the time, seems like this is due to the internal librdkafka thread termination. A SIGTERM seems to do the trick, though.
If you need to know exactly [...] php-rdkafka
Yep, so I guess i need a dr_cb, because the way my script needs to work is to parse some files, produce several messages, and then do a specific task depending on the report callback.
Would you be interested if I pull-request the dr_cb feature ? I guess this should follow the same principle than error_cb and rebalance_cb, right ?