|
2 | 2 | This repository has PHP examples for Kafka consumers / producers for:
|
3 | 3 | - [php-rdkafka](https://github.com/arnaud-lb/php-rdkafka): Examples just using the PHP extension
|
4 | 4 | - [php-kafka-lib](https://github.com/jobcloud/php-kafka-lib): PHP library that relies on [php-rdkafka](https://github.com/arnaud-lb/php-rdkafka) and supports [avro](https://github.com/flix-tech/avro-serde-php)
|
| 5 | +- [php-simple-kafka-client](https://github.com/php-kafka/php-simple-kafka-client): Examples just using the PHP extension |
| 6 | +- [php-simple-kafka-lib](https://github.com/php-kafka/php-simple-kafka-lib): PHP library that relies on [php-simple-kafka-client](https://github.com/php-kafka/php-simple-kafka-client) and supports [avro](https://github.com/flix-tech/avro-serde-php) |
5 | 7 |
|
6 | 8 | ## Examples
|
7 |
| -- [php-rdkafka](src/ext-php-rdkafka/pure-php) |
8 |
| -- [php-kafka-lib](src/ext-php-rdkafka/php-kafka-lib) |
9 |
| - |
10 |
| -## Start containers for examples |
11 |
| -Be sure to start the docker containers. |
12 |
| -To do so, run this in the project root: |
13 |
| -```bash |
14 |
| -docker-compose up -d |
15 |
| -docker-compose exec php bash |
16 |
| -``` |
17 |
| -Then follow the instructions in the example folders. |
| 9 | +Checkout these folders to see how to run the examples: |
| 10 | +- [php-rdkafka](src/ext-php-rdkafka) |
| 11 | +- [php-simple-kafka-client](src/ext-php-simple-kafka-client) |
18 | 12 |
|
19 | 13 | ## Customize to fit your setup
|
20 | 14 | If you wan't to test / debug something that is closer to your setup,
|
21 | 15 | you can modify the following arguments in `docker-compose.yml`:
|
22 | 16 | ```
|
23 |
| -PHP_IMAGE_TAG: 7.4-cli-alpine3.11 |
24 |
| -LIBRDKAFKA_VERSION: v1.4.0 |
25 |
| -PHP_RDKAFKA_VERSION: 4.0.3 |
| 17 | +PHP_IMAGE_TAG: 8.0-cli-alpine3.13 |
| 18 | +LIBRDKAFKA_VERSION: v1.6.1 |
| 19 | +PHP_EXTENSION: php-kafka/php-simple-kafka-client |
| 20 | +PHP_EXTENSION_VERSION: v0.1.1 |
26 | 21 | ```
|
27 | 22 | Adjust those, to reflect your setup and afterwards run:
|
28 | 23 | ```
|
|
0 commit comments