I recently discovered an throughput bottleneck within my micronaut application which using kafka streams and micnronaut serde. After using JFR, i see blocked threads on monitors on java.io.RandomAccessFile call.
After investigation, i found out that bottleneck happens when trying to load class from classloader - effectively calls RandomAccessFile with file locking.
Each time we call Json.createGenerator with bytes we effectively will lock filesystem and block on monitor (if parallel processing happens)
I propose to cache generator in Api