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

4th
Jul 2016
axiao
@joostshao
Jul 04 2016 03:07
https://arnaud-lb.github.io/php-rdkafka/phpdoc/rdkafka-producertopic.produce.html how to define the producer send a message successfully or failed ?
the doc said no return , just null
Arnaud Le Blanc
@arnaud-lb
Jul 04 2016 08:34
@joostshao: produce is asynchronous, but you can set a delivery callback with RdKafka\Conf::setDrMsgCb(). This will allow you to be notified when a message delivery fails or succeeds
Ferran Caellas Puig
@FerCa
Jul 04 2016 08:35
Hi again! Any plan on releasing the high level consumer?
Arnaud Le Blanc
@arnaud-lb
Jul 04 2016 08:36
Hi @FerCa ! I’ll try to release it soon. In the meantime, you can install it manually: https://arnaud-lb.github.io/php-rdkafka/phpdoc/rdkafka.installation.manual.html
Ferran Caellas Puig
@FerCa
Jul 04 2016 08:37
ok! thanks!
Ferran Caellas Puig
@FerCa
Jul 04 2016 09:57
I'm having problems using the low level and consumer groups
and I'm setting the group id in the conf for the consumer:
$conf->set('group.id', $config['consumerGroup']);
I have 3 partitions in the topic
and I'm starting 2 consumers consuming the 3 partitions
since my two consumers are in the same consumer group, I was expecting the messages to be distributed between my 2 consumers
but I'm getting all the messages in the 2 consumers
Arnaud Le Blanc
@arnaud-lb
Jul 04 2016 10:04
In the low-level consumer, you choose which partitions you are consuming. If each consumer consume different partitions, you get different messages in each consumer. Else, you can the same messages in each consumer :)
Ferran Caellas Puig
@FerCa
Jul 04 2016 10:05
ok, then here the consumer groups didn't apply?
I mean, its irrellevant to which consumer group a consumer belongs?
Arnaud Le Blanc
@arnaud-lb
Jul 04 2016 10:07
In the low level consumer, the consumer group is used only as a namespace when storing offsets.
Ferran Caellas Puig
@FerCa
Jul 04 2016 10:07
ok, thanks for the clarification!
Arnaud Le Blanc
@arnaud-lb
Jul 04 2016 10:07
If you want automatic balancing of partitions accross consumers, you should be using the high level consumer