Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the NetworkClient of new producer/consumer, currently we don't have a similar timeout for requests. The producer sends requests in a non-blocking way and does not wait for response. If the response to a request never received (due to reasons such as broker is down), the request will never be completed. Similar situation could occur on consumer.a socket is disconnected the network client will fail the requests with a NetworkException.

However, It might take very long for TCP connection to timeout. And this mechanism is not sufficient in cases where a broker is hung.

A client side request timeout in NetworkClient would be useful We need to add this request timeout to NetworkClient to solve this problem. The timeout will also be used as implicit timeout for some methods such as KafkaProducer.close(), KafkaProducer.flush().

...