Download the PHP package siberfx/apache-kafka without Composer

On this page you can find all versions of the php package siberfx/apache-kafka. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package apache-kafka

Apache Kafka Queue Service for Laravel 12.x 13.x

A Laravel queue driver backed by Apache Kafka (tested against Confluent Cloud). It lets you dispatch Laravel jobs to a Kafka topic and process them with the standard queue:work worker.

Requirements

Required before starting

If you are using Confluent Cloud, create an account at https://www.confluent.io/, create a new project and provision an "Apache Kafka on Confluent Cloud" cluster, then create an API key/secret that will be used as the SASL username/password below.

Make sure the rdkafka extension is installed and enabled before installing the package:

Installation

1. Install the rdkafka PHP extension

A ready-to-use container is provided under docker/ (PHP 8.4 with librdkafka and rdkafka already compiled). Run it with docker compose -f docker/docker-compose.yaml up.

2. Require the package via Composer

The service provider (Siberfx\Kafka\KafkaServiceProvider) is auto-discovered — no manual registration required.

Configuration

1. Add a kafka connection to config/queue.php

The connector reads its settings from the queue connection config. Add the following entry under connections:

2. Set your .env

For a local, unauthenticated broker use KAFKA_SECURITY_PROTOCOL=PLAINTEXT and leave the SASL values empty.

3. (Optional) Publish the package config

This publishes config/kafka-config.php, which you can use to hold your own Kafka-related values. Note that the queue driver itself is configured from config/queue.php (step 1).

Usage

Define a job

Dispatch a job

Run the worker

The worker subscribes to the given Kafka topic and processes incoming messages:

Pushing a raw job

You can also push directly through the Queue facade:

Limitations

This driver implements the core produce/consume path. The following are not yet supported:

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see the composer.json for license details.


All versions of apache-kafka with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
laravel/framework Version ^12.0 | ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package siberfx/apache-kafka contains the following files

Loading the files please wait ...