PHP code example of glushkovds / laravel-kafka-queue

1. Go to this page and download the library: Download glushkovds/laravel-kafka-queue library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

glushkovds / laravel-kafka-queue example snippets


LaravelKafka\KafkaQueueServiceProvider::class

'kafka' => [
    'driver' => 'kafka',
    'broker_list' => env('KAFKA_BROKER_LIST', 'kafka:9092'),
    'queue' => env('KAFKA_QUEUE', 'default'),
    'heartbeat' => 5 * 1000, //Heartbeat in milliseconds
    'group_name' => env('KAFKA_QUEUE_GROUP', 'default'),
    'producer_timeout' => 1 * 1000, //Producer timeout in milliseconds
    'consumer_timeout' => 3 * 1000, //Consumer timeout in milliseconds
    'auth_login' => env('KAFKA_AUTH_LOGIN'),
    'auth_mechanism' => env('KAFKA_AUTH_MECHANISM', 'PLAIN'),
    'auth_password' => env('KAFKA_AUTH_PASSWORD'),
    'auth_ssl_ca_location' => env('KAFKA_AUTH_SSL_CA_LOCATION'),
],