Kafka ਨੂੰ ਚਲਾਉਣ ਲਈ ਨਿਗਰਾਨੀ ਮੁੱਖ ਮੈਟ੍ਰਿਕਸ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ — ਖਾਸ ਕਰਕੇ ਕਨਜ਼ਿਊਮਰ ਲੈਗ (ਕਨਜ਼ਿਊਮਰ ਕਿੰਨੀ ਦੂਰ ਪਿੱਛੇ ਹਨ) — ਨਾਲ ਹੀ broker ਸਿਹਤ, throughput, ਅਤੇ partition ਸਥਿਤੀ। ਨਿਗਰਾਨੀ ਅਤੇ ਕਨਜ਼ਿਊਮਰ ਲੈਗ ਨੂੰ ਸਮਝਣਾ Kafka ਨੂੰ ਭਰੋਸੇਮੰਦ ਢੰਗ ਨਾਲ ਚਲਾਉਣ ਲਈ ਮਹੱਤਵਪੂਰਨ ਹੈ।
ਕਨਜ਼ਿਊਮਰ ਲੈਗ (ਇੱਕ ਮੁੱਖ ਮੈਟ੍ਰਿਕ)
CONSUMER LAG → how far BEHIND a consumer is = (latest offset) − (consumer's committed offset):
→ high/growing lag → the consumer can't keep up with the production rate (a problem!)
→ indicates: slow processing, too few consumers, a stuck/failed consumer, or a traffic spike
→ monitor lag → detect when consumers fall behind (a primary Kafka health signal)
