- Issue created by @louis-cuny
- Status changed to Postponed: needs info
about 1 year ago 3:40pm 5 October 2023 - š«š·France fgm Paris, France
That looks like a settings issue more than a bug. Can you show the part of your settings files concerned with Kafka, redacting credentials if any exist ?
- Status changed to Active
about 1 year ago 9:00am 6 October 2023 - š«š·France louis-cuny
This happens on "drush en kafka", so the default configuration should be correct. I usually set the configurations after the modules are installed
I didn't do anything else than composer require and drush en (excepting insatlling rdkafka)
- š¬š§United Kingdom astoker88
@louis i noticed you have tagged this issue under the dev branch?
https://www.drupal.org/project/kafka/issues/3318381 š Bump ext-rdkafka dependency for PHP 8.1 and D10 compatibility Needs work - I raised this some time ago, and in the end ended up forking the branch and using a custom version of the module so that we could upgrade to PHP8.1.
Worth trying with these settings.
@fgm - i see your again active, can we work together to get a new release of this module out? Would love to get back to using your contrib version.
- š¬š§United Kingdom astoker88
@louis - also please see a working config:
// Kafka config
$brokers = [
'broker-9092',
'broker1-9092',
'broker2-9092',
];
$settings['kafka'] = [
'topic' => 'topic1',
'topic2' => 'topic2',
'consumer' => [
'brokers' => $brokers,
],
'producer' => [
'brokers' => $brokers,
'conf' => [
'acks' => '1',
'metadata.broker.list' => implode( ',', $brokers),
'linger.ms' => '1000',
],
],
]; - š«š·France fgm Paris, France
@astoker88 just passing by :-). But if you finalize the patch for š Bump ext-rdkafka dependency for PHP 8.1 and D10 compatibility Needs work I could review it. Still no client work on Kafka for Drupal so I won't be spending much time on this.
Regarding @louis-cuny's case, I suppose his "brokers" key is a string instead of an array indeed, hence the question.
@louis-cuny The module contains an
example.settings.local.php
with the correct format, which needs to be set before enabling the module.
- š«š·France louis-cuny
I got some precisions
I'm using -beta1 version + https://www.drupal.org/project/kafka/issues/3318381 š Bump ext-rdkafka dependency for PHP 8.1 and D10 compatibility Needs work patch
I understand I need to update my configurations.This issue is more about having this error so soon in the installation. I guess it would be better to let users install the module with the default configuration proposed in config/install
And later throw errors or show messages in status page for example - š¬š§United Kingdom astoker88
@louis ok Iām going to reroll the patch for 8.1 functionality , and as part of that review the default config and install too.
- š«š·France louis-cuny
I think my installation has another issue
There is something strange, in ClientFactory.php for example, it's requiering a class Producer
use RdKafka\Producer;
Like if it would be some other composer package required. There is no package listed in the composer.json of the module
Or it's just Phpstorm that doesn't see php-extension classes ?Some info about rdkafka extension I have installed:
rdkafka support enabled
version 6.0.3
build date Oct 5 2023 13:43:25
librdkafka version (runtime) 1.6.0
librdkafka version (build) 1.6.0.255PHP Version 8.1.22
If I'm correct, these informations from phpinfo page are saying I have required librdkafka and rdkafka php extension ?
I am confused about librdkafka that is no more https://github.com/edenhill/librdkafka
But https://github.com/confluentinc/librdkafka. I guess it's the same, but no php client - š«š·France fgm Paris, France
Not sure we can easily fix this: when an error is in the settings, it means it is in code which runs pretty much before any module logic.
Do you confirm the error goes away when the settings format is correct ?
Would it be better to just throw an exception or a die() when settings are not as expected ? The downside, of course, being that the check has to run on each succesful hit too.
- š«š·France louis-cuny
Actually, I don't understand the config in kafka/config/install.
It seems to not be used at all in the module. Can you confirm please?If so, it's not related to the error, it would mean than only settings are used. But in the readme it says that settings should be set up after module installation.
I will try to restart the installation later
I suspect also something is wrong with composer requirements. Because of the current rdkafka ^5 requirement, I had to use --ignore-platform-reqs on installation (I'm using 6.0.3)
- š«š·France fgm Paris, France
Indeed, AFAICS that config is not used at all and should be removed : everything comes from settings.
Regarding the README, I think I see why it is not clear: it says "install the module as usual", and that means "do a composer require / composer install", it does not mean "enable" the module: that should be done after creating the settings.
- š«š·France louis-cuny
Adding the settings could also be done before composer require, maybe it would avoid any confusion
I guess some users are still going to try to install and enable it before writting the settings
Maybe we should do some check to avoid the installation if settings are breaking the module - @louis-cuny opened merge request.
- Status changed to Needs review
about 1 year ago 1:39pm 11 October 2023