Download the PHP package roi-up-agency/php-kafka-schema-registry without Composer
On this page you can find all versions of the php package roi-up-agency/php-kafka-schema-registry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download roi-up-agency/php-kafka-schema-registry
More information about roi-up-agency/php-kafka-schema-registry
Files in roi-up-agency/php-kafka-schema-registry
Package php-kafka-schema-registry
Short Description Library to consume and produce in Apache Kafka < 2.1 and Schema Registry, using php traits. This lib use the base present in Nicofuma/poc-php-kafka lib.
License MIT
Informations about the package php-kafka-schema-registry
php-kafka-schema-registry
Library to consume and produce in Apache Kafka < 2.1 and Schema Registry, using php traits. This lib use the base present in Nicofuma/poc-php-kafka lib.
Installation
.env Params
All .env params can be setted in consumer class
Notes
- The examples use laravel commands, but you can use it in any php class
- This vendor use subject and version to encode / decode records
Consumption Usage
Consumer default config
Consumer
- "metadata.broker.list" (ConsumerConfParam::METADATA_BROKER_LIST) = broker list given
Topic
- "auto.offset.reset" (TopicConfParam::AUTO_OFFSET_RESET) = 'smallest'
Important:
Your CallbackClass must implements Kafka\SchemaRegistry\Interfaces\ConsumerCallbackInterface presents in vendor
Production Usage
Producer default config
Producer
- "compression.type" (ProducerConfParam::COMPRESSION_TYPE) = 'snappy'
- "linger.ms" (ProducerConfParam::LINGER_MS) = '20'
- "broker.version.fallback" (ProducerConfParam::BROKER_VERSION_FALLBACK) = '2.0.1'
- "queue.buffering.max.kbytes"(ProducerConfParam::QUEUE_BUFFERING_MAX_KBYTES) = (string)32*1024
Topic
None
Available Config
You can add any extra configuration you need using ConsumerConfParam o ProducerConfParam constants before call listen or produce methods depens your context.
To set configs:
You can get a full list of current config using dump method present in rdKafka lib To get configs:
More references at
- confluent-schema-registry-docs, Schema registry - Confluent platform documentation
- schema-registry-ui, View, create, evolve and manage your Avro Schemas for multiple Kafka clusters
- kafka-site, Kafka site documentation
- avro-site, Avro site documentation
All versions of php-kafka-schema-registry with dependencies
ext-rdkafka Version >=3.0
wikimedia/avro Version ^1.8
guzzlehttp/guzzle Version ^6.3
vlucas/phpdotenv Version *