Comments (2)
@the100rabh I have exactly the same issue, did you find the solution?
from phpkafka.
Just a tip, I ran into the same issue, but if you look at the source code, you'll see that the kafka_consume
function (in kafka.c) actually writes its error output to syslog (/var/log/syslog). just run a test-php script, check the exit code (echo $?), if the exit code is anything other than 0, tail the syslog and you'll probably see something like phpkafka - % Failed to start consuming: Local: Unknown partition show up.
There's also a slight issue with the format specifiers used in the extension, I've gotten output like this:
phpkafka - start_offset: -2 and offset passed: -618028960
which is down to the fact that start_offset
is of the type int64_t
, and the format specifier is %d (whereas it should be "%" PRId64 "..."
).
Anyway, call the set_partition
method before consuming should fix the problem, it did for me anyway. Meanwhile, I've set about putting together a quick-fix PR here, you can check to see if this fixes the issue by using my fork (branch consume-fix). Just compile and install as normal. It should work just fine
from phpkafka.
Related Issues (8)
- PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/kafka.so' - librdkafka.so.1: cannot open shared object file: No such file or directory in Unknown on line 0 HOT 3
- how to get the length of kafka topic
- PHP Fatal error: Class 'Kafka' not found in /var/www/html/kafka-test.php on line 3 HOT 1
- why not fast but slow HOT 1
- Need help to resolve this error
- Unable to load dynamic library '/root/phpkafka/modules/kafka.so' - librdkafka.so.1: cannot open shared object file: No such file or directory in Unknown on line 0 HOT 16
- Problems about offset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpkafka.