Giter VIP home page Giter VIP logo

Comments (3)

kazemimorteza68 avatar kazemimorteza68 commented on August 21, 2024

have you installed and enabled librdkafka on your machine ?

Please try this code :

`

        $posts =["id"=>random_int(1000,10000),"password"=>Factory::create()->password,"email"=>Factory::create()->email,
                    "name"=>Factory::create()->name];

    $producer=Kafka::publishOn('new_users', 'localhost:9092');
    $message = new Message(
        headers: ['header-key' => 'header-value'], //?
        body: $posts,//?
        key: 'kafka key here'// ?
    );
    $messageBatch = new MessageBatch();
    $messageBatch->push($message);
    return $producer->sendBatch($messageBatch);`

from laravel-kafka.

mateusjunges avatar mateusjunges commented on August 21, 2024

Hi @K2ouMais, I tried using the docker compose file and indeed I get the same error. I don't know exactly what's wrong and currently i don't have time to debug it, but you can try with this one which works for me.

from laravel-kafka.

mateusjunges avatar mateusjunges commented on August 21, 2024

@K2ouMais i'm closing this since there is no more updates. Please feel free to reopen this issue or create a new one if your issues is not solved yet.

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.