The long sending delay in PHP is caused by the PHP language feature.
PHP reinitializes a KafkaProducer object each time it sends a message. The initialization involves various operations, such as connecting to various brokers and updating Metadata. In VPCs, the consumption time is over 100ms. It takes more than 500ms to consume data in a public network. In contrast, Java re-uses KafkaProducer and has a low sending latency.