Comments (4)
after few tries, i manage to run your project by manually add your composer to new project compose and run composer install..
then everything run fine till now, thx.
your example project help a lot
from laravel-kafka.
Hey @Ceater let me know if this repo helps you.
The consumer is in App\Console\Commands\TestTopicConsumer, and it consumes messages from the test-topic.
The TestHandler class is responsible for handling the consumed messages. For now, it simply logs the messages into storage/logs/laravel.log, but it's a working example.
The producer is accessible by the /produce
route, and it publishes a simple message to the test-topic
.
from laravel-kafka.
Hi @mateusjunges , your repo help a lot. Since this is my 1st time using laravel and kafka i don't know what to do with your project.
but i wonder, if you can guide me more from installing to using the kafka..
here is what I know.
- How to use and run your project on cloud.
- changing consumer and producer
and here is what i want to know more.
- Is there any delay between consumer and producer? i tried to change the debug logging using string but when i call the producer, i wont consume immediately. So i had to restart serve, kafka, and re-tail the log. But after few mins i can use it. So i wonder if your C and P have delay if i change the script.
- How to implement your project in clean laravel or running laravel project? i always got error that my rdkafka version is 6.0 and your project req version 4.0 or 5.0 so i have to ignore req to bypass that problem.
- Even if i successfully install via compose, i get error from RDKafka like this
because i new to laravel, i don't know what to do with that kind of error. maybe i forget to put certain php file to certain place. or else. So i wonder if you have time to guide me on how to use it for begginer.
thx
from laravel-kafka.
To be honest with you i can't really take time to help you to set up this package, but i can give you some hints:
- As kafka is
async
, you cannot assume that there is no delay between the time when a message was published and it being consumed. Kafka is often used for communication in microservices architecture, so one service do not expect a synchronous response from another. If you change the code of your consumer you must always restart it in order to the changes to take effect, and yes, there can be some time until it start consuming messages again, at least in my tests in local environments. - To install this package in a fresh laravel installation you can simply follow the readme documentation for installation instructions. About the requirements of
ext-rdkafka
on version 5.0 and 4.0, it is because on the time i created this package, these were the only versions available and compatible. Ext-rdkafka 6.0 was released on2022-01-07
, and i will add it as a supported version as soon as i have time available to do that. - The exception you are getting:
No such configuration property: "key"
occurs because you just copied the readme code and tried to pusblish messages using it. Thekey
on->withConfigOptions(['key' => 'value'])
means the kafka configuration key you want to set using that method, so its just a generic example. You can find all available kafka consumer/producer configuration options here
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.