Giter VIP home page Giter VIP logo

Comments (4)

Acing-Boy avatar Acing-Boy commented on August 21, 2024 1

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.

mateusjunges avatar mateusjunges commented on August 21, 2024

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.

Acing-Boy avatar Acing-Boy commented on August 21, 2024

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.

  1. How to use and run your project on cloud.
  2. changing consumer and producer

and here is what i want to know more.

  1. 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.
  2. 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.
  3. Even if i successfully install via compose, i get error from RDKafka like this

Screen Shot 2022-01-09 at 17 19 35

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.

mateusjunges avatar mateusjunges commented on August 21, 2024

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:

  1. 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.
  2. 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 on 2022-01-07, and i will add it as a supported version as soon as i have time available to do that.
  3. 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. The key 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.