All Projects → rapideinternet → Laravel Queue Kafka

rapideinternet / Laravel Queue Kafka

Licence: mit
Kafka Queue driver for Laravel

Labels

Projects that are alternatives of or similar to Laravel Queue Kafka

Chemex
☕ 咖啡壶是一个免费、开源、高效且漂亮的运维资产管理平台。软硬件资产管理、归属/使用者追溯、盘点以及可靠的服务器状态管理面板。基于优雅的Laravel框架和DcatAdmin开发。
Stars: ✭ 132 (-1.49%)
Mutual labels:  laravel
Laravel cities
Find any country/city in the world. Get Long/Lat etc. Deploy geonames.org database localy. Optimized DB tree
Stars: ✭ 133 (-0.75%)
Mutual labels:  laravel
Eager Load Pivot Relations
Eager load pivot relations for Laravel Eloquent's BelongsToMany relation.
Stars: ✭ 134 (+0%)
Mutual labels:  laravel
Laravel Seo
SEO package made for maximum customization and flexibility
Stars: ✭ 130 (-2.99%)
Mutual labels:  laravel
Laravel Getting Started
本文介绍如何开始使用 Laravel !
Stars: ✭ 132 (-1.49%)
Mutual labels:  laravel
Menus
📌 Menu generator package for the Laravel framework
Stars: ✭ 133 (-0.75%)
Mutual labels:  laravel
Laravel Governor
Manage authorization with granular role-based permissions in your Laravel Apps.
Stars: ✭ 131 (-2.24%)
Mutual labels:  laravel
Simple Qrcode
An easy-to-use PHP QrCode generator with first-party support for Laravel.
Stars: ✭ 1,923 (+1335.07%)
Mutual labels:  laravel
Daybydaycrm
DaybydayCRM an open-source CRM, to help you keep track of your daily workflow.
Stars: ✭ 1,856 (+1285.07%)
Mutual labels:  laravel
Repository
🖖Repository Pattern in Laravel. The package allows to filter by request out-of-the-box, as well as to integrate customized criteria and any kind of filters.
Stars: ✭ 134 (+0%)
Mutual labels:  laravel
Multi Auth
Laravel Multi-Authentication Package
Stars: ✭ 131 (-2.24%)
Mutual labels:  laravel
Laravel Coreui Vue
Laravel 5.6 with CoreUI (VueJS Full Starter Template) >>> Deprecated, please go to https://coreui.io/laravel/
Stars: ✭ 132 (-1.49%)
Mutual labels:  laravel
1024tools
1024Tools开发工具箱
Stars: ✭ 133 (-0.75%)
Mutual labels:  laravel
Laravel Paddle
Paddle.com API integration for Laravel with support for webhooks/events
Stars: ✭ 132 (-1.49%)
Mutual labels:  laravel
Hdcms
支持 PC、H5、微信公众号、微信小程序多应用平台
Stars: ✭ 134 (+0%)
Mutual labels:  laravel
Eloquent Tree
Eloquent Tree is a tree model for Laravel Eloquent ORM.
Stars: ✭ 131 (-2.24%)
Mutual labels:  laravel
Laravel Emojione
Laravel package to make it easy to use the gorgeous emojis from EmojiOne
Stars: ✭ 133 (-0.75%)
Mutual labels:  laravel
Mpesa Php Sdk
A PHP sdk for the new Mpesa RESTful APIs
Stars: ✭ 134 (+0%)
Mutual labels:  laravel
F Admin
f-admin是一套基于Laravel框架开发的基础权限后台系统
Stars: ✭ 134 (+0%)
Mutual labels:  laravel
Laravel Mobile Verification
This package provides convenient methods for sending and verifying mobile verification requests.
Stars: ✭ 132 (-1.49%)
Mutual labels:  laravel

Kafka Queue driver for Laravel

Latest Stable Version Build Status Total Downloads StyleCI Software License

Installation

  1. Install librdkafka c library

    $ cd /tmp
    $ mkdir librdkafka
    $ cd librdkafka
    $ git clone https://github.com/edenhill/librdkafka.git .
    $ ./configure
    $ make
    $ make install
    
  2. Install the php-rdkafka PECL extension

    $ pecl install rdkafka
    
  3. a. Add the following to your php.ini file to enable the php-rdkafka extension extension=rdkafka.so

    b. Check if rdkafka is installed
    Note: If you want to run this on php-fpm restart your php-fpm first.

    php -i | grep rdkafka
    

    Your output should look something like this

    rdkafka
    rdkafka support => enabled
    librdkafka version (runtime) => 1.0.0-RC2
    librdkafka version (build) => 0.11.4.0
    
  4. Install this package via composer using:

     composer require rapide/laravel-queue-kafka
    
  5. Add LaravelQueueKafkaServiceProvider to providers array in config/app.php:

     Rapide\LaravelQueueKafka\LaravelQueueKafkaServiceProvider::class,
    

    If you are using Lumen, put this in bootstrap/app.php

     $app->register(Rapide\LaravelQueueKafka\LumenQueueKafkaServiceProvider::class);
    
  6. Add these properties to .env with proper values:

     QUEUE_DRIVER=kafka
    
  7. If you want to run a worker for a specific consumer group

     export KAFKA_CONSUMER_GROUP_ID="group2" && php artisan queue:work --sleep=3 --tries=3
    

    Explaination of consumergroups can be found in this article http://blog.cloudera.com/blog/2018/05/scalability-of-kafka-messaging-using-consumer-groups/

Usage

Once you completed the configuration you can use Laravel Queue API. If you used other queue drivers you do not need to change anything else. If you do not know how to use Queue API, please refer to the official Laravel documentation: http://laravel.com/docs/queues

Testing

Run the tests with:

vendor/bin/phpunit

Acknowledgement

This library is inspired by laravel-queue-rabbitmq by vyuldashev. And the Kafka implementations by Superbalist be sure to check those out.

Contribution

You can contribute to this package by discovering bugs and opening issues. Please, add to which version of package you create pull request or issue.

Supported versions of Laravel

Tested on: [5.4, 5.5, 5.6, 5.7]

New version is underway

A version for Laravel 6,7,8 is underway. Also supporting the new RdKafka library

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].