-
-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General Guidance for using kafka, and similar packages with frankenphp #1358
Comments
Can you show your failing worker script? It looks like you pass an int instead of a string when calling |
@dunglas thank you for the quick response. The failing worker script is already in the original post (worker.php). On the otherhand, here is the producer.php script that works just fine.
|
@dunglas Just wanted to check in on this. Would be great to know if this is something I am doing wrong, or if there is anything else to be addressed. much appreaciated. |
pcntl_sigprocmask(SIG_BLOCK, array(SIGIO)); It is probably not wise to mess with signals in frankenphp which is Go running PHP. If you get the signal while the request is running -- this is fine. But other threads running Go might not work too well with this set on the process.
You should disable strict types so PHP will automatically cast your integer to a string, otherwise, you need to make sure types are the correct type: $conf->set('socket.timeout.ms', '60'); // or socket.blocking.max.ms, depending on librdkafka version |
Hi,
I am new to frankenphp, trying to evaluate this for a project. I started with https://github.com/f00b4r/2023-10-frankenphp and got it working. Now, I want to use some extensions like kafka, redis, mysql, etc. I used the following modifications to
However, If I do a test on worker.php, I am getting the following error.
I have another script, producer.php in the same folder, with the same publish code, and If I send a post request, it successfully publishes to kafka. So, it looks like the worker part is having the issue? I looked around for all available resources, including ai help, but their recommendations have not resolved this. Any help is much appreciated.
The text was updated successfully, but these errors were encountered: