Consumer lag = (partition LEO) - (consumer committed offset). Zero lag means the consumer is caught up. Growing lag means the consumer is falling behind production rate. Monitor with kafka-consumer-groups.sh --describe or via JMX. Lag is the most important consumer health metric in production.
Key configuration
fetch.min.bytes=1 — min data broker waits before responding
fetch.max.wait.ms=500 — max time broker waits if fetch.min.bytes not met
max.partition.fetch.bytes=1048576 — max bytes per partition per fetch