conduktor.io ↗

Kafka Exception LogTruncationException

org.apache.kafka.clients.consumer.LogTruncationException
Non-retriable Client

In the event of an unclean leader election, the log will be truncated, previously committed data will be lost, and new data will be written over these offsets. When this happens, the consumer will detect the truncation and raise this exception (if no automatic reset policy has been defined) with the first offset known to diverge from what the consumer previously read.

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.clients.consumer.LogTruncationException: Detected truncated partitions: {orders-0=...} after fetch offset/leader epoch validation

Related

Related Client exceptions: DisconnectException · InterruptException

Hitting LogTruncationException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.