PHPackages                             nirmalsharma/laravel-kafka-producer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. nirmalsharma/laravel-kafka-producer

ActiveLibrary[Queues &amp; Workers](/categories/queues)

nirmalsharma/laravel-kafka-producer
===================================

1.0.5(3y ago)076MITPHPPHP &gt;=7.2

Since Nov 18Pushed 3y ago2 watchersCompare

[ Source](https://github.com/nirmalsharmamca/laravel-kafka-producer)[ Packagist](https://packagist.org/packages/nirmalsharma/laravel-kafka-producer)[ RSS](/packages/nirmalsharma-laravel-kafka-producer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (12)Used By (0)

A Lightweight Kafka Producer Warpper for Laravel 6+ and PHP 7.3+
----------------------------------------------------------------

[](#a-lightweight-kafka-producer-warpper-for-laravel-6-and-php-73)

Install Kafka Producer Warpper

```
  composer require nirmalsharma/laravel-kafka-producer
```

Examples
--------

[](#examples)

[Laravel 6](examples/laravel-6-example)

Use Kafka in code.
------------------

[](#use-kafka-in-code)

Add following in web.php

```
use KafkaProducer;

$topic = "kafka-topic";
$data = [
    "user_ref" => "usr.123456",
    "message" => "Hello World"
];
$key = "usr.123456"; // Optional, Default null
$headers = [
    "ContentType" => "application/json",
    "Timezone" => "GMT +05:30"
]; // Optional
Kafka::push($topic, $data, $key, $headers);
```

Environment Variables
---------------------

[](#environment-variables)

To run this, you will need to add the following environment variables to your .env file Config reference:

```
IS_KAFKA_ENABLED=             // Default:  1
KAFKA_BROKERS=
KAFKA_DEBUG=                  // Default: false
KAFKA_SSL_PROTOCOL=           // Default: plaintext
KAFKA_COMPRESSION_TYPE=       // Default: none
KAFKA_IDEMPOTENCE=            // Default: false

```

Authors
-------

[](#authors)

- [Nirmal Sharma](https://github.com/nirmalsharmamca)
- [Praveen Menezes](https://github.com/praveenmenezes)

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

Features
--------

[](#features)

- Light weight kakfa wrapper
- Easy to use event produce in code.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

11

Last Release

1236d ago

Major Versions

v0.0.8 → 1.0.02022-12-04

PHP version history (2 changes)v0.0.6PHP ^7.2|^7.4|^8.0|^8.1

1.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b73872f148a595a3893c4f43684add3758f50e16408167d98876c4ab9714610e?d=identicon)[nirmalsharmamca](/maintainers/nirmalsharmamca)

---

Top Contributors

[![nirmalkissht](https://avatars.githubusercontent.com/u/118504956?v=4)](https://github.com/nirmalkissht "nirmalkissht (11 commits)")[![praveen-kissht](https://avatars.githubusercontent.com/u/156430945?v=4)](https://github.com/praveen-kissht "praveen-kissht (7 commits)")[![praveenmenezes](https://avatars.githubusercontent.com/u/10197721?v=4)](https://github.com/praveenmenezes "praveenmenezes (5 commits)")[![nirmalsharmamca](https://avatars.githubusercontent.com/u/13479422?v=4)](https://github.com/nirmalsharmamca "nirmalsharmamca (2 commits)")

### Embed Badge

![Health badge](/badges/nirmalsharma-laravel-kafka-producer/health.svg)

```
[![Health](https://phpackages.com/badges/nirmalsharma-laravel-kafka-producer/health.svg)](https://phpackages.com/packages/nirmalsharma-laravel-kafka-producer)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[amphp/parser

A generator parser to make streaming parsers simple.

14952.8M16](/packages/amphp-parser)[amphp/serialization

Serialization tools for IPC and data storage in PHP.

13451.1M18](/packages/amphp-serialization)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2238.8M171](/packages/react-async)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
