Skip to content

Blog

Production error deep-dives — root cause, reproduction, and the fix that holds.

How to Implement Retry With Exponential Backoff in Java

Build a retry helper in plain Java 21: exponential backoff, full jitter, Retry-After, a time budget and tests, run against a deliberately flaky HTTP server.

Kafka: Cannot Perform Operation After Producer Closed

Kafka IllegalStateException 'Cannot perform operation after producer has been closed' explained: why it happens, the Spring share

Kafka: Consumer Is Not Subscribed to Any Topics — Fix

IllegalStateException: Consumer is not subscribed to any topics or assigned any partitions — why poll() throws it, the subscribe/assign contract, and the fix.

How to Use Text Blocks in Java 21 for SQL, JSON and Emails

Learn how to use text blocks in Java 15+ on a currency-rates feed: SQL, JSON and email templates, the indentation rules, six compiler errors and 15 checks.

Kafka BufferExhaustedException: Fix Failed to Allocate Memory

Kafka producer throws BufferExhaustedException: failed to allocate memory within max blocking time? Here's why buffer.memory fills up and the exact fix.

Kafka "Connection to node -1 could not be established" — Fix

Fix Kafka's "Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available" — the Docker advertised.listeners fix.

Kafka SerializationException: Fixing Poison Pill Records

Kafka SerializationException: "Error deserializing key/value" crashes your consumer in a loop. Fix it with ErrorHandlingDeserializer and a dead letter topic.

How to Use LinkedHashMap in Java: Order and an LRU Cache

How to use LinkedHashMap in Java 21: keep insertion order, move entries, and build a small LRU cache with access order, on a library catalogue with 22 checks.

How to Implement the Strategy Pattern in Java (Java 21)

Replace a growing if/else chain with the strategy pattern in Java 21. A library late-fee calculator, built step by step, with lambdas, an EnumMap and 15 checks.

Kafka NotControllerException: Why It Happens and How to Fix It

Kafka throws NotControllerException (code 41) when an admin request hits a broker that isn't the active controller. Here's the mechanism and the real fix.