This is the documentation for
v1.11 but the latest version is
v1.13
.
You can switch versions in the menu on the left/at the top.
Check your current version with the following command:
composer show mateusjunges/laravel-kafka
To publish your messages to Kafka, you can use the publishOn method, of Junges\Kafka\Facades\Kafka
class:
use Junges\Kafka\Facades\Kafka;
Kafka::publishOn('topic')
This method returns a ProducerBuilder
instance, which contains a few methods to configure your kafka producer.
The following lines describes these methods.