Blog
Production error deep-dives — root cause, reproduction, and the fix that holds.
Kafka InstanceAlreadyExistsException: AppInfo Mbean Fix
Kafka logs 'Error registering AppInfo mbean javax.management.InstanceAlreadyExistsException'. Here's what a duplicate client.id really breaks and how to fix it.
Kafka Timeout Before Position for Partition Could Be Determined
Kafka consumer failing with TimeoutException: Timeout of 60000ms expired before the position for partition could be determined? Here's the fix.
How to Implement Factory and Abstract Factory in Java 21
Build a URL shortener in Java 21 with a static factory, a registry factory and an abstract factory, then swap memory for file storage with one config value.
Kafka: Timed out waiting for a node assignment — Fix
Kafka AdminClient and kafka-topics.sh fail with 'Timed out waiting for a node assignment. Call: createTopics'. Here's why it happens and the exact fix.
Kafka Streams LockException: Failed to Lock the State Directory
Kafka Streams throwing LockException: Failed to lock the state directory for task? Here's the exact cause, why it happens, and the fix.
Kafka: Connection Terminated During Authentication — Fix
Kafka AuthenticationException 'terminated during authentication' with its three-reason hint decoded: security.protocol mismatch, TLS/firewall, and mTLS. Repro plus the fix.
Kafka TimeoutException: Expiring N record(s) — Cause and Fix
Kafka producer failing with TimeoutException: Expiring N record(s): ms has passed since batch creation? What delivery.timeout.ms really does — and the fix.
Kafka: Subscription to Topics, Partitions and Pattern Are Mutually Exclusive
Kafka throws IllegalStateException: Subscription to topics, partitions and pattern are mutually exclusive when you mix subscribe() and assign(). Here's the fix.
Kafka InitProducerId Timeout: Why It Hangs and the Fix
Kafka producer throws 'Timeout expired after 60000ms while awaiting InitProducerId' and initTransactions() hangs on startup. Here's the real root cause and the fix.
How to Implement the Observer Pattern in Java (Java 21)
Build a stock-alert system with the observer pattern in Java 21: a thread-safe subject, lambda listeners, safe unsubscribe, and 16 checks that prove it works.