#java
7 posts tagged “java”.
// 2026
Share consumers in Kafka: queues without giving up the log
Share groups (KIP-932) let many consumers read the same partition and acknowledge records one by one. How they work, how they differ from consumer groups, and how to use KafkaShareConsumer from Java.
Microbenchmarking Java with JMH in the age of new JEPs
How to measure Java code correctly with JMH, and how virtual threads, compact object headers, AOT caches, the Vector API and lazy constants change what a benchmark actually tells you.
My JVM reading list
Books and resources that helped me understand what actually happens when Java code runs.
Virtual threads in practice: what changes for backend code
Java virtual threads make thread-per-request cheap again. Here is how to adopt them, what pinning is, and the habits you should drop.
Fibonacci in O(log n): from matrices to fast doubling in Java
Why the naive Fibonacci is exponential, how a 2×2 matrix turns it logarithmic, and a fast-doubling BigInteger implementation that computes F(1 000 000) in a fraction of a second.
Backpressure in Project Reactor, explained with code
What request(n) really means, how prefetch and limitRate shape demand, and how to choose an overflow strategy when a producer is faster than its consumer.
JVM bytecode instrumentation with ASM: timing every method without touching the source
Build a tiny Java agent that rewrites classes at load time with ASM and records how long each method takes, and learn the pitfalls on the way.