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

8th
Sep 2016
Matthew Goslett
@matthewgoslett
Sep 08 2016 07:06
Hi Everyone. I was wondering if there's any way to get the \RdKafka\Conf object after a \RdKafka\KafkaConsumer has been instantiated.
I need to be able to change a consumer group id after the fact
Magnus Edenhill
@edenhill
Sep 08 2016 07:16
config cannot be changed after client creation
Matthew Goslett
@matthewgoslett
Sep 08 2016 07:17
ah ok, thanks
Matthew Goslett
@matthewgoslett
Sep 08 2016 07:54
also, it seems like the producer & consumer try to talk to the broker as soon as they're created. Is there anyway to stop that?
It's an issue for me with Laravel specifically, when I composer update a package, and this is followed by a 'optimise' which combines all classes into a single compiled.php

eg: Generating autoload files

Illuminate\Foundation\ComposerScripts::postUpdate
php artisan optimize
%3|1473321097.324|FAIL|rdkafka#consumer-1| 127.0.0.1:9092/bootstrap: Connect to ipv4#127.0.0.1:9092 failed: Connection refused
%3|1473321097.324|ERROR|rdkafka#consumer-1| 127.0.0.1:9092/bootstrap: Connect to ipv4#127.0.0.1:9092 failed: Connection refused
%3|1473321097.324|ERROR|rdkafka#consumer-1| 1/1 brokers are down
Generating optimized class loader

Magnus Edenhill
@edenhill
Sep 08 2016 07:58
@matthewgoslett: You could call addBrokers() later when you want to get started
just make sure not to specify any bootstrap.servers/metadata.broker.list properties
Matthew Goslett
@matthewgoslett
Sep 08 2016 08:00
ah ok got it, easy enough for the addBrokers() but for $conf->set('metadata.broker.list', $config['brokers']), my high level consumer is already created
I know you said conf can't be changed after creation, but is their way to change the metadata.broker.list on the consumer?
Magnus Edenhill
@edenhill
Sep 08 2016 08:06
Nope.