Laravel Kafka Documentation

website·Indexed 31 days ago

https://laravelkafka.com/docs/v2.9/

Documentation for Laravel Kafka, providing guides and references for integrating Kafka with the Laravel framework.

Tokens
135
Snippets
2
Records
2
Agent score
9%

What's inside Laravel Kafka

  1. Create and run a basic Kafka consumer

    v2.9
    Use the Kafka::consumer() method to define the topics to subscribe to, configure the broker address, enable auto-commit, and assign a message handler to process incoming messages.
    $consumer = Kafka::consumer(["my-topic"])
        ->withBrokers("localhost:8092")
        ->withAutoCommit()
        ->withHandler(new MessageHandler)
        ->build();
    
    $consumer->consume();