Open vcrfxia opened 5 years ago
I think most calls to the admin client are wrapped in a retry loop in KSQL. The original reason was that it reduces instability due to slowness communicating with Kafka. I agree that if we can rely on admin client retries, then we should do that.
When executing
list topics;
, KSQL callsKafkaTopicClient#describeTopics()
(link) which callsAdminClient#describeTopics()
within a retry loop (link) that retries up to five times before giving up. The AdminClient has a default request timeout of 2 minutes (link) which means if KSQL is unable to connect to Kafka,list topics;
takes 12 minutes to time out which is unreasonable from a user's perspective.The
AdminClient
already has retry behavior built in (link) so there's no need to wrap AdminClient requests within KSQL. If desired, we can also configure request timeout from within KSQL by specifying a value inDescribeTopicsOptions
(link) which gets used here in the AdminClient.I suspect there are other KSQL requests (besides
list topics;
) that suffer from similar timeout behavior.