twidpay / utils
Utils for twidpay
Installs: 4 992
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- ramsey/uuid: ^4.2.2
- twidpay/twid-logger: ^2.0
Requires (Dev)
- php-mock/php-mock: ^2.2
- phpunit/phpunit: ^7.0|^8.0|^9.0
- dev-master
- 2.0.8
- 2.0.6
- 2.0.4
- 2.0.3
- 2.0.2
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- dev-revert-21-empty-field-fix
- dev-empty-field-fix
- dev-chunk-Customer
- dev-update-pii-lib
- dev-pii-lib-v2
- dev-version-upgrade
- dev-static
- dev-pii-data-interface
- dev-log
- dev-kafka-producer
This package is auto-updated.
Last update: 2025-06-09 12:59:02 UTC
README
This PHP library provides a convenient way to produce messages to Kafka topics using the RdKafka PHP extension.
Installation
-
Requirements:
- RdKafka PHP extension (Installation Instructions)
-
Installation via Composer:
You can install the library via Composer. Run the following command in your terminal:
composer require twidpay/utils
-
Usage:
- All possible configurations for the KafkaProducer can be found here
use Utils\queue\KafkaProducer; $config = [ 'metadata.broker.list' => 'localhost:9092', 'compression.codec' => 'snappy', 'security.protocol' => 'ssl', //other kafka configuration ]; $this->kafkaProducer = new KafkaProducer($config); //key is optional $this->kafkaProducer->produce($topic, $message, $key);