Releases: arquivei/php-kafka-consumer
Adds support for Monolog 3
Merge pull request #60 from ThalesMendes/monolog-3-support Adds support for monolog 3 where a record is no longer an array
Update laravel support
Add support to
Laravel 10
Laravel 11
PHP 8.2
PHP 8.3
Add option to print consumer configs
Adds an option to src/ConsumerBuilder.php
to print consumer configs to stdout before starting it, making it easier to debug during development.
Example:
$consumer = ConsumerBuilder::create('broker:port', 'php-kafka-consumer-group-id', ['topic'])
->withSasl(new Sasl('username', 'pasword', 'mechanisms'))
->withCommitBatchSize(1)
->withSecurityProtocol('security-protocol')
->withHandler(new DefaultConsumer())
->withPrintConfigs(true) // default is false
->build();
The output will look like this:
++++++++++++++++++ CONSUMER CONFIGS ++++++++++++++++++
CONFIG | VALUE
topics | topic_name
dlq | topic_name_dlq
commit | 1
maxCommitRetries | 6
maxMessages | -1
auto.offset.reset | smallest
queued.max.messages.kbytes | 10000
enable.auto.commit | false
compression.codec | gzip
max.poll.interval.ms | 86400000
group.id | group_id
bootstrap.servers | localhost:9093
security.protocol | SASL_PLAINTEXT
sasl.mechanisms | PLAIN
Laravel 9 support and removal of dependency on external base image
- Added Laravel 9 support for Illuminate/console
- Extracted the dockerfile from joesantos418's repo and moved to this
project own repository - Also, added a new pipeline to automatically build the base images used
by the automated tests
2.3.1
- Updates dependencies to PHP 8.1, ext-rdkafka 5.0.2, and librdkafka 1.8.2.
- Fixes a bug that caused an error when not using the settings flags
Improve kafka config handling
Right now is not possible to customize consumer options, making it
impossible for more advanced use cases that need a fine-grained control
of the consumer options.
Add possibility to use auto commit instead of the default manual commit.
Add possibility for the user to pass custom kafka options to the
consumer.
2.2.4
Bug fix: consumer configs were passed to the producer and vice versa resulting in CONFWARN messages. The consumer and producer configurations have been split and cleaned up.
Fix internal retry rdkafka error.
We made an adjustment to disregard the error RD_KAFKA_RESP_ERR__TIMED_OUT which is internal to the lib of rdkafka.
This error happens because we don't have a message to be consumed and the return is null. Only that the error is registered in rdkafka, which is not necessarily an error that we must consider.
Add retry
A class has been added with all the retry logic that should be used in commit and message consumption.
Consumption starts to deal with timeout errors, retaining in the case of consumption timeout.
Extends test coverage
Tests have been added to increase test coverage as well as test against different environments and bugs that stopped the library from working with the ext-rdkafka in version 4 have been fixed.