Releases: arquivei/php-kafka
Releases · arquivei/php-kafka
First Release Candidate
This release adds a number of refactorings and abstractions in comparison to the original project:
- Remove coupling with the laravel framework.
- Add abstraction for failure handling: Before a failure would always be sent to a DLQ. Now the client is able to create custom failure handling logic by implementing the FailHandler interface.
- Create builder class to ease instantiation and configuration of consumers.
- Create abstraction for producing messages: This is the first step in turning this lib into a more generic kafka client.
- Simplify consumers: Previously, in order to consume messages, the client had to extend an abstract Consumer class. This has been removed, now the client only needs to provide a simple callable (handler) that receives the raw message.
- Create message decoder abstraction: A decoder is an object that receives the raw message and decodes it into a more useful data. The decoded message is passed as an argument to the handler. This allows the client to create a number of decoders and share this decoding logic across different handlers, making the handler implementation simpler. For a possible list of encoders:
- A json decoder that parses json and returns stdClass (already implemented)
- A json decoder that returns a deserialized object
- An Avro decoder that returns a deserialized object
- etc
- Create listener abstraction: The client can now respond to important events during consumer process and thus removes the need of logging logic in this client.