Download the PHP package micromus/kafka-bus without Composer
On this page you can find all versions of the php package micromus/kafka-bus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download micromus/kafka-bus
More information about micromus/kafka-bus
Files in micromus/kafka-bus
Package kafka-bus
Short Description This is my package kafka-bus
License MIT
Homepage https://github.com/micromus/kafka-bus
Informations about the package kafka-bus
Kafka Bus for PHP
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Installation
You can install the package via composer:
Requirements
- PHP ^8.2
ext-rdkafka
and a running Kafka cluster- Optional for consumers:
ext-pcntl
(to handle stop signals gracefully)
Usage (via Composer)
Quick start: Bus with producer and consumer
Below is a minimal example of wiring the bus, registering a topic, adding a producer route, and running a listener that handles messages from the same topic.
Producing only
If you only need to produce messages, configure the bus and call publish
with ProducerMessage
instances. You do not need to start a listener in that case.
Consuming only
If you only need to consume, configure the worker(s) and call listener('name')->listen()
. Your MessageHandler
implementation will be invoked for each message received.
More examples
- Producer only: see
examples/producer.php
- Consumer only: see
examples/consumer.php
- Full setup with routing: see
examples/bus.php
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Kirill Popkov
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of kafka-bus with dependencies
ext-pcntl Version *
ext-rdkafka Version *
psr/container Version ^2.0
psr/log Version ^3.0