Google Cloud Professional Data Engineer — Question 103

You operate an IoT pipeline built around Apache Kafka that normally receives around 5000 messages per second. You want to use Google Cloud Platform to create an alert as soon as the moving average over 1 hour drops below 4000 messages per second. What should you do?

Answer options

Correct answer: A

Explanation

Option A is correct because it uses a sliding time window to continually monitor the average message rate in real-time, allowing for immediate alerts when the threshold is breached. Options B and C use fixed windows or delayed counting methods that do not align with the need for a moving average check, while option D also relies on a fixed time window with potentially delayed alerts.