salebab / phpkafka

PHP extension for Apache Kafka

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why not fast but slow

xibiange opened this issue · comments

echo time();

produce("test", $i); ``` } echo "\n".time();

To amortize the initial setup cost and provide meaningful performance figures you need to do two things:

  • you will need to make some room for the initial connection setup, put a sleep(1) between new Kafka.. and the for loop.
  • send more messages, such as 100 000.