Apache Kafka Tutorial 0/111 lessons ~6 min read Lesson 65

    Under Replicated Partitions

    What is Under Replicated Partitions?

    Course progress0%
    Focus
    9 guided sections
    Practice signal
    Examples included
    Career prep
    Foundation builder

    Introduction

    What is Under Replicated Partitions? Under replicated partitions mean followers are not caught up.

    Understanding the topic

    What happens — Under Replicated Partitions:

    • Identify topic, partition, offset scope.
    • Check broker health and ISR.
    • Inspect consumer errors and deploys.
    • Remediate: scale, DLT, replay, or fix schema.
    TermDescription
    Consumer lagRecords behind latest offset.
    URPUnder-replicated partitions.
    Poison messageBlocks processing at offset.
    Offset resetSkip or replay — use carefully.

    Visual explanation

    Pipeline view:

    text
    Incident
    topic/partition/offset
    producer metrics
    broker health
    consumer processing
    commit/replay decision

    Step-by-step explanation

    1. Alert — Lag, URP, error rate.
    2. Diagnose — Partition-level view.
    3. Fix — DLT, scale, rollback.
    4. Postmortem — Document root cause.

    Informative example

    Example:

    bash
    kafka-topics --bootstrap-server localhost:9092 --create --topic under-replicated-partitions --partitions 6 --replication-factor 3
    kafka-console-producer --bootstrap-server localhost:9092 --topic under-replicated-partitions
    kafka-console-consumer --bootstrap-server localhost:9092 --topic under-replicated-partitions --from-beginning
    kafka-consumer-groups --bootstrap-server localhost:9092 --describe --group under-replicated-partitions-service

    Execution workflow

    1Under Replicated Partitions workflow
    1 / 4

    Alert

    Lag, URP, error rate.

    Best practices

    • Preserve sample records and offsets before remediation.
    • Separate retryable, poison, and infrastructure failures.
    • Use DLT and replay tools with audit logs.
    • Run recovery drills before real incidents.

    Common mistakes

    • Resetting offsets without approval or evidence.
    • Scaling consumers when the real issue is partition skew.
    • Deleting poison messages without root-cause analysis.

    Summary

    Under Replicated Partitions — Work from evidence by topic-partition-offset, not from guesses or dashboards alone.

    Ready to mark this lesson complete?Track your journey across the entire course.