Consumer Lag — Concept Check
Questions on Consumer Lag. Lag is the difference between the latest produced offset and the last committed consumer offset; high lag indicates the consumer cannot keep up with the producer rate.
Questions in this quiz
7 questions on Consumer Lag — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A Kafka consumer group 'order-processing-service' shows a lag of 400 on partition 1. What does this indicate?
- AThe consumer has processed all messages.
- BThe producer has stopped producing messages.
- CThe consumer is processing messages faster than the producer.
- DThe consumer is falling behind in processing messages.
2.A consumer group has fewer consumers than partitions, leading to high lag. What is a potential solution?
- AIncrease the max.poll.interval.ms setting.
- BDecrease the max.poll.records setting.
- CReduce the number of partitions.
- DAdd more consumers to match the partition count.
3.A Kafka consumer experiences high lag due to slow database operations. What can be done to reduce this lag?
- AUse asynchronous processing to handle database operations.
- BReduce the number of partitions.
- CIncrease the number of consumers beyond partition count.
- DIncrease the max.poll.records setting.
4.A consumer's max.poll.records setting is too high, causing frequent rebalances. What should be adjusted?
- AIncrease max.poll.interval.ms to a lower value.
- BAdd more consumers to the group.
- CReduce max.poll.records to process smaller batches.
- DIncrease the number of partitions.
5.A Kafka consumer's lag is stable at 1000, but the rate of lag growth is high. What does this suggest?
- AThe consumer may soon fall behind significantly.
- BThe consumer has caught up with the producer.
- CThe consumer is not experiencing any issues.
- DThe consumer is processing messages at the same rate as production.
6.What is the primary metric to monitor for Kafka consumer health?
- AConsumer lag
- BNumber of partitions
- CProducer throughput
- DConsumer group ID
7.You are using Prometheus to monitor Kafka consumer lag. Which alert condition is more actionable?
- AAlert on partition count changes.
- BAlert on consumer group ID changes.
- CAlert on lag growing by 100/minute.
- DAlert on lag exceeding 10,000 for 5 minutes.