This document discusses using Kafka to consume topics in PHP applications. It begins with some background on Kafka and key concepts. It then provides an example PHP code snippet using the librdkafka library to consume messages from Kafka topics. The document goes on to describe the author's experience optimizing a PHP Kafka consumer from an initial "naive implementation" that achieved 3.2 million messages processed per hour up to a final optimized "client-server" approach that achieved 1.6 billion messages processed per hour through techniques like using forks to process messages in parallel, adjusting librdkafka configuration, killing forks periodically, starting multiple consumers, and using strace to analyze performance.