<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Jmh on alimov.dev</title>
    <link>https://alimov.dev/tags/jmh/</link>
    <description>Recent content in Jmh on alimov.dev</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 07 Apr 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://alimov.dev/tags/jmh/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Reactive Source-Sink: Benchmarking Backpressure in Pulsar Pipelines</title>
      <link>https://alimov.dev/posts/reactive-source-sink-benchmarking-backpressure-in-pulsar-pipelines/</link>
      <pubDate>Tue, 07 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://alimov.dev/posts/reactive-source-sink-benchmarking-backpressure-in-pulsar-pipelines/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Does wrapping a blocking Pulsar consumer in &lt;code&gt;Flux.generate&lt;/code&gt; give you backpressure? Does adding backpressure cost you throughput?&lt;/p&gt;
&lt;p&gt;The first answer is no — wrapping blocking calls in Reactor operators creates something that looks reactive but behaves like a fire hose. The second answer is also no: a properly implemented reactive pipeline is &lt;strong&gt;dramatically faster&lt;/strong&gt; than both alternatives. Our JMH benchmark shows the reactive approach hitting &lt;strong&gt;6.29 million messages/sec&lt;/strong&gt; — 27x faster than the Flux-wrapped approach (232k msg/sec) and 24,800x faster than plain blocking (253 msg/sec). The reactive pipeline is faster because it does less work per message: no thread blocking, no &lt;code&gt;Mono.fromCallable&lt;/code&gt; allocation, no &lt;code&gt;boundedElastic&lt;/code&gt; scheduling overhead.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
