Github user tzulitai commented on the issue:
https://github.com/apache/flink/pull/4935
Hi @Aitozi, sorry for the long delay in relaying back to this PR.
I'm still not convinced that this is a sane solution. For example, what is
a "good" setting for the `KEY_REGISTER_TIMES` property? Isn't 1 enough, since
you mentioned that the missing metric is registered in Kafka after the first
poll. Making this configurable seems unnecessary to me.
I wonder if we can try the following two approaches:
1) Manually register the metrics that we know would be missing before the
first poll, or
2) Poll once first outside the loop just to make sure that all Kafka
metrics are existent, perform the metrics registration, and then start the
regular fetch loop.
What do you think?
---