First message from producer in php-request with the error "Local: Message timed out" the rest are sent successfully.
I have 1 topic and 7 hosts in broker list.
Producer config:
queue.buffering.max.ms: 1
socket.timeout.ms: 500
Topic config:
message.timeout.ms: 2000
request.timeout.ms: 1000
Any idea what goes wrong?
My ELK log from RdKafkaConf::setDrMsgCb:
19.07.2019, 14:06:18.332 Sent to Kafka.
19.07.2019, 14:06:18.178 Sent to Kafka.
19.07.2019, 14:06:18.040 Sent to Kafka.
19.07.2019, 14:06:17.880 Sent to Kafka.
19.07.2019, 14:06:17.627 Sent to Kafka.
19.07.2019, 14:06:17.444 Sent to Kafka.
19.07.2019, 14:06:17.270 Sent to Kafka.
19.07.2019, 14:06:17.078 Sending to Kafka error. Local: Message timed out
@PopovAnatolii normally this means the broker couldn't be reached, are all 7 hosts up and running? Can you always reproduce this?
Maybe the code could help to investigate this further
@nick-zh , no, it happens from time to time. In 50% of requests.
My simple Yii2 wrapper class https://codeshare.io/2E9nB8
Usage in code:
Yii::$app->KafkaTopic->publish($message)->flush();
@PopovAnatolii thx, let me get back to you on this, today is quite busy, so maybe i have time during the weekend
@nick-zh , Thank. I'll wait.
I'm here for any additional information.
@nick-zh, kafka version 0.9.0.2.3
@nick-zh, with kafka 1.0.0 problem is gone.
Maybe i shold set some configutation for kafka version compatibility?
https://github.com/edenhill/librdkafka/wiki/Broker-version-compatibility
@PopovAnatolii sry for the late response. Since your broker is now on 1.0.0 the default should be fine. Before 0.10.0 the lib was unable to query the broker version and was unable to determine if certain features / requests were available.
As a side note, it might be worth checking out if you can upgrade to 1.1.1 (latest 1.x version) or of course to the current release of 2.3.0
@nick-zh ,
I set that settings to skip version request:
'api.version.request' => 'false',
'broker.version.fallback' => '0.9.0.2'
everything is working now.
For old versions of brokers i should use some specific settings
which are described here: https://github.com/edenhill/librdkafka/wiki/Broker-version-compatibility
I had Local: Message timed out because message.timeout.ms
was less than api.version.request.timeout.ms.
thank!