'How to use Ratelimiter on flink?

I want to throttle the Kafka consumers in my Flink job.

Looking through the source code for Flink 1.12, I find FlinkConnectorRateLimiter and GuavaFlinkConnectorRateLimiter. But I can't find anything connecting this rate limiter to FlinkKafkaConsumer.

How can I implement rate limiting for Kafka in Flink 1.12?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source