confluentinc / librdkafka

The Apache Kafka C/C++ library
Other
7.37k stars 3.11k forks source link

Message is 'stuck' when the network cable is unplugged #4603

Closed GiangNguyenMinh closed 5 months ago

GiangNguyenMinh commented 5 months ago

Description

when I unplug the network cable. Even though rd_kafka_poll() still calls continuously, delivery report is never called when the local message timeout (30s) is reached until the network cable is reconnected.

How to reproduce

  1. Produce some message with rd_kafka_producev(). Create a thread and repeatedly call rd_kafka_poll(), set message.timeout.ms = 30000.
  2. Unplug the network cable (Waited more than message.timeout.ms but still did not see the delivery returned).
  3. Reconnect the network cable. Delivery report function immediately returns 'local message timeout' error.

Checklist

Please provide the following information: