You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
I was profiling producer code and found that producer->send() was taking more than 30 ms even on localhost! When I dug up a little I found that $this->zookeeper->getPartitionState($topicName, $partitionId); in src/Kafka/Client.php in function name getHostByPartition. This line of code was taking almost all of that time. The application I am working with cannot accept a delay of 5-10 ms more. Is there any workaround for this?
The text was updated successfully, but these errors were encountered:
Can you use the new non-Zookeeper producer? Pass the Kafka broker(s) as the last parameter of the constructor, rather than the Zookeeper hosts as the first.
e.g. $this->producer = new Produce(null, null, $kafkaBrokers);
I was profiling producer code and found that
producer->send()
was taking more than 30 ms even on localhost! When I dug up a little I found that$this->zookeeper->getPartitionState($topicName, $partitionId);
in src/Kafka/Client.php in function namegetHostByPartition
. This line of code was taking almost all of that time. The application I am working with cannot accept a delay of 5-10 ms more. Is there any workaround for this?The text was updated successfully, but these errors were encountered: