Comments (12)
@irfanpathanudr This phpinfo()
shows the web configuration for PHP. Some installations have a different configuration on CLI. Does rdkafka
show up when you run php -i
on the terminal, and which version?
You can also checked if the rdkafka extension is enabled in terminal at all by running php -m
from laravel-kafka.
I suggest you do not run composer require with the --ignore-platform-reqs
flag. The platform requirements defined in laravel-kafka
's composer.json is meant to prevent the issues you are running into. This applies to most if not all packages.
from laravel-kafka.
@irfanpathanudr this constant comes from librdkafka, not this package. You need to install this library in order to use laravel-kafka. This is the installation guide
from laravel-kafka.
run commond
composer require mateusjunges/laravel-kafka
but composer show error
- mateusjunges/laravel-kafka[v1.4.0, ..., v1.4.4] require ext-rdkafka ^5.0|^4.0 -> it is missing from your system. Install or enable PHP's rdkafka extension.
- Root composer.json requires mateusjunges/laravel-kafka ^1.4 -> satisfiable by mateusjunges/laravel-kafka[v1.4.0, ..., v1.4.4].
run commond with
composer require mateusjunges/laravel-kafka --ignore-platform-reqs
no error come but kafka client throw error
Undefined constant "Junges\Kafka\RD_KAFKA_PARTITION_UA"
@mateusjunges Can you pl. help me to come out of this issue? It'll huge thanks for you :)
from laravel-kafka.
thank you @rtuin
Error :Call to undefined method RdKafka\ProducerTopic::producev()
php -i
can you pl. help me @rtuin @mateusjunges
from laravel-kafka.
Undefined constant "Junges\Kafka\RD_KAFKA_PARTITION_UA"
can you plz help out form this issue
from laravel-kafka.
@irfanpathanudr The Call to undefined method RdKafka\ProducerTopic::producev()
issue occured because the librdkafka version is under 0.11.4, if you upgrade it should work.
from laravel-kafka.
@mateusjunges
my requirement is to setup Kafka client and my system configuration is
Ubuntu 18.04
php 7.2,
laravel/framework: "^6.2" for Admin,
laravel/lumen-framework": "^7.0" for API,
Rdkafka 5.0 , librdkafka 0.11.3.
ubuntu 18.4 have only supporte librdkafka 0.11.3 version mention in bellow image or link.
https://repology.org/project/librdkafka/versions
http://213.146.141.13/upstreamproject/details/librdkafka
so please help me out to communicate with kafka
from laravel-kafka.
@irfanpathanudr It will not work on php 7.2, the minimun php version required is 8.0. About the librdkafka
version, i can add a workaround to use the produce
method instead, if the version is under 0.11.4, but it will not be able to add message headers.
from laravel-kafka.
@irfanpathanudr i've added support for librdkafka
v0.11.3, but as @rtuin mentioned, you should not run composer with --ignore-platform-reqs
flag. You are only running into issues because of that, and i can't support you if your system does not follow the minimun requirements needed to use this package. I closed this with #43, but feel free to reopen or create another issue after you fix your system with the minimun requirements of this package.
from laravel-kafka.
EDIT: Fixed it by using php-fpm
local.ERROR: Undefined constant "Junges\Kafka\RD_KAFKA_PARTITION_UA" {"exception":"[object] (Error(code: 0): Undefined constant "Junges\Kafka\RD_KAFKA_PARTITION_UA" at /var/www/html/smartplement-asset/vendor/mateusjunges/laravel-kafka/src/AbstractMessage.php:9)
Hi, im getting the same error while on Ubuntu 18.4 using build 1.6.6
EDIT: upgrade rdkafka to 6.0.1 still the same
upraded to ubuntu 20.4, still the same
EDIT: Fixed it by using php-fpm
from laravel-kafka.
This issue still persist when I try to use phpfranken and octane.
```bash
Undefined constant "Junges\Kafka\RD_KAFKA_PARTITION_UA" {"exception":"[object] (Error(code: 0): Undefined constant \"Junges\\Kafka\\RD_KAFKA_PARTITION_UA\" at /var/www/gateway/vendor/mateusjunges/laravel-kafka/src/AbstractMessage.php:11)
[stacktrace]
#0 /var/www/gateway/app/Actions/CreateWalletAction.php(21): Junges\\Kafka\\AbstractMessage->__construct(NULL, NULL, NULL, '{\"id\":\"264e48de...')
#1 /var/www/gateway/app/Http/Controllers/Api/V1/Auth/AuthController.php(51): App\\Actions\\CreateWalletAction->handle(Object(App\\Models\\User))
#2 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\\Http\\Controllers\\Api\\V1\\Auth\\AuthController->register(Object(App\\Http\\Requests\\V1\\Auth\\RegisterRequest))
#3 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\\Routing\\Controller->callAction('register', Array)
#4 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controllers\\Api\\V1\\Auth\\AuthController), 'register')
#5 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\\Routing\\Route->runController()
#6 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\\Routing\\Route->run()
#7 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#8 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#9 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#10 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(159): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#11 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(125): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequest(Object(Illuminate\\Http\\Request), Object(Closure), Array)
#12 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(87): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequestUsingNamedLimiter(Object(Illuminate\\Http\\Request), Object(Closure), 'api', Object(Closure))
#13 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle(Object(Illuminate\\Http\\Request), Object(Closure), 'api')
#14 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#15 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/Router.php(805): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#16 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#17 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#18 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#19 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#20 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#21 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#22 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#23 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#24 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#25 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#26 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#27 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#28 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#29 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(99): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#30 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#31 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(62): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#32 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#33 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#34 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#35 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#36 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#37 /var/www/gateway/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#38 /var/www/gateway/vendor/laravel/octane/src/ApplicationGateway.php(36): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#39 /var/www/gateway/vendor/laravel/octane/src/Worker.php(84): Laravel\\Octane\\ApplicationGateway->handle(Object(Illuminate\\Http\\Request))
#40 /var/www/gateway/vendor/laravel/octane/bin/frankenphp-worker.php(53): Laravel\\Octane\\Worker->handle(Object(Illuminate\\Http\\Request), Object(Laravel\\Octane\\RequestContext))
#41 [internal function]: {closure}()
#42 /var/www/gateway/vendor/laravel/octane/bin/frankenphp-worker.php(74): frankenphp_handle_request(Object(Closure))
#43 /var/www/gateway/public/frankenphp-worker.php(3): require('/var/www/gatewa...')
#44 {main}
"}
from laravel-kafka.
Related Issues (20)
- Failed to resolve `broker:9092` HOT 4
- Getting a timeout issue, while trying to publish a message. HOT 7
- Undefined constant \"Junges\\Kafka\\RD_KAFKA_PARTITION_UA\ HOT 3
- Upstash Support - Producer not sending messages. HOT 3
- Wrong return type in Junges\Kafka\Config\Config->getCommit HOT 2
- Cannot Consume published messages in laravel 11 and php 8.3.6 HOT 15
- Issue consuming records from Avro topic HOT 1
- Cannot consume produced messages in v2.0 HOT 2
- What do we need to set for the `--consumer` flag. HOT 1
- Message consuming is still an issue in v2.1 HOT 10
- Encoded payloads: Is it possible with Avro Serializer to Save encoded messages in Kafka when sending it using AvroSerialize and doing the opposite when reading with Deserializer HOT 1
- Is there any support to Retry policies ? HOT 2
- [QUESTION] Possibility to describe topic / calculate read backlog HOT 1
- [Question/bug] Consuming Tombstones and send it to dlq throws $payload must be of type string, null given HOT 1
- cant send message HOT 8
- Error "Specified group generation id is not valid" during consumption HOT 3
- How to commit each message in withHandler HOT 1
- Missing messages HOT 2
- Customizable flush retried and timeout
- stopAfterLastMessage not working as expected. HOT 1
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 laravel-kafka.