<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ege Karaosmanoglu on Medium]]></title>
        <description><![CDATA[Stories by Ege Karaosmanoglu on Medium]]></description>
        <link>https://medium.com/@egekaraosmanoglu?source=rss-a229dea17627------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jtG0RNa7PP-VlMtvW4EyMg.jpeg</url>
            <title>Stories by Ege Karaosmanoglu on Medium</title>
            <link>https://medium.com/@egekaraosmanoglu?source=rss-a229dea17627------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 15:58:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@egekaraosmanoglu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Turns Out the Secret to Vibe Coding Isn’t the Model — It’s the Scaffolding (Even With a Free Model)]]></title>
            <link>https://medium.com/@egekaraosmanoglu/turns-out-the-secret-to-vibe-coding-isnt-the-model-it-s-the-scaffolding-even-with-a-free-model-9c61659fcc0c?source=rss-a229dea17627------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c61659fcc0c</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[ai-coding-agent]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <dc:creator><![CDATA[Ege Karaosmanoglu]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 10:43:28 GMT</pubDate>
            <atom:updated>2026-07-06T10:43:28.704Z</atom:updated>
            <content:encoded><![CDATA[<p>What model you use isn’t that important if you have a scaffolding tool for your company that creates a working example every time, plus a skill for the AI to always follow the same way. Even free models will work for you.</p><p>Now let’s prove it with an “IoT Sensor Data Ingestion” microservice.</p><p>In this example we’ll use OpenCode with the Big Pickle model (from OpenCode Zen).</p><p>First, sign up at <a href="https://www.camelbee.io/camelbee/initializer/">https://www.camelbee.io/camelbee/initializer/</a> to get your YOUR_CAMELBEE_API_KEY.</p><p>Next, connect your AI tool to the CamelBee MCP server mentioned here: <a href="https://www.camelbee.io/index.html">https://www.camelbee.io/index.html</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*BAjJS5tTLhLTiTQqyzRivw.png" /></figure><p>Connect OpenCode to the MCP url: <a href="https://www.camelbee.io/mcp">https://www.camelbee.io/mcp</a></p><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;camelbee&quot;: {<br>      &quot;type&quot;: &quot;http&quot;,<br>      &quot;url&quot;: &quot;https://www.camelbee.io/mcp&quot;,<br>      &quot;headers&quot;: {<br>        &quot;Authorization&quot;: &quot;Bearer YOUR_CAMELBEE_API_KEY&quot;<br>      }<br>    }<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*smmjj-bLDdbAIHwybZOXnA.png" /></figure><p>Connected to the CamelBee MCP server from OpenCode.</p><p>Now I need a microservice called “IoT Sensor Data Ingestion” — luckily this matches one of the prompt recipes on camelbee.io. In your case you’ll probably need to tweak the two prompts we’re about to see for your own needs :)</p><p><a href="https://www.camelbee.io/prompt-recipes.html#recipes">https://www.camelbee.io/prompt-recipes.html#recipes</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*90JZrEiK9GZwWXloYCYCcg.png" /></figure><p>Back to OpenCode — paste the first prompt from the “IoT Sensor Data Ingestion” recipe to create the microservice:</p><p><em>“Use the CamelBee MCP server to generate a Quarkus microservice called sensor-ingestion (group io.iot, service sensoringestion). It should subscribe to an MQTT topic to ingest sensor readings (create) and expose a REST API for listing and getting readings. Backends: Kafka for forwarding each sensor event (create only) and MongoDB for persistence (create, list, and get). Then unzip the generated zip into a folder named after the artifactId, then stop and instruct me to open a fresh AI session inside that folder so the project’s AI rules and commands load.”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*5ytzto4UPX6U82dLloc7Uw.png" /></figure><p>OpenCode with the Big Pickle model started working on it and created it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*rb037Z9Mw7ct-Dw-ltPekg.png" /></figure><p>Now close the current OpenCode session, switch into the created sensor-ingestion folder,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*wzT96WmNcHiEaKNs5smEOg.png" /></figure><p>and run OpenCode again so we’re inside the microservice folder — this way OpenCode loads all the skills and AI readme files that come by default with the CamelBee microservice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*sa_UIJReKKGVayfGuUWp7g.png" /></figure><p>One thing worth noting: microservices generated from the CamelBee MCP server or Initializer come with a fully working Order domain microservice — selected interfaces, backends, and a complete set of unit, integration, and black-box tests, plus the topology debugger UI that ships with the CamelBee framework and starters, which already has precisely synced Maven dependencies.</p><p>Now copy the full prompt below and ask OpenCode to replace the generated microservice with the domain and functionality we actually need:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*FmkXiVCuAnMhgsi8fzxbGA.png" /></figure><pre>I need to transform this generated microservice into an IoT Sensor<br>Data Ingestion service. Here&#39;s what I need:<br><br>DOMAIN:<br>- Replace Order/Purchase domain with SensorReading domain<br>- SensorReading has: readingId (UUID, generated on ingestion),<br>  deviceId (String), sensorType (SensorType enum: TEMPERATURE,<br>  HUMIDITY, PRESSURE, CO2, MOTION, VIBRATION), value (Double),<br>  unit (String), quality (ReadingQuality enum: GOOD, UNCERTAIN, BAD),<br>  location (String, nullable), recordedAt (Instant — from device),<br>  receivedAt (Instant — set by this service on ingestion)<br>- SensorReadingPage (REST list response): readings (List&lt;SensorReading&gt;),<br>  totalItems, page, pageSize, deviceId, from, to<br><br>MQTT INTERFACE (topic: sensors/+/readings — wildcard):<br>- Payload: JSON SensorReading (without readingId, receivedAt)<br>- On receive: generate readingId (UUID), set receivedAt = now()<br>- Single CreateOrder operation: ingest reading<br><br>REST INTERFACE (replace order-api.yaml):<br>- GET /sensor-readings?deviceId=device-001<br>      &amp;from=2025-01-01T00:00:00Z&amp;to=2025-01-02T00:00:00Z<br>      &amp;page=0&amp;pageSize=50<br>  Response: SensorReadingPage<br>- GET /sensor-readings/{readingId}<br>  Response: SensorReading<br><br>KAFKA BACKEND (topic: sensor-readings):<br>- Key: deviceId<br>- Publish full SensorReading JSON after every MQTT ingestion<br><br>MONGODB BACKEND (collection: sensorReadings):<br>- Index: { deviceId: 1, recordedAt: -1 }<br>- TTL index: recordedAt expires after 30 days<br>- CreateOrder: insert document<br>- ListOrders: query by deviceId + optional time range (from/to), paginated<br>- GetOrder: find by readingId<br><br>MQTT INGEST FLOW (central CreateOrder route):<br>1. MQTT consumer receives on sensors/{deviceId}/readings<br>2. Parse JSON, generate readingId, set receivedAt = now()<br>3. Call MongoDB CreateOrder backend → insert SensorReading<br>4. Call Kafka CreateOrder backend → publish to sensor-readings topic<br>5. Fire-and-forget — no HTTP response<br><br>REST QUERY FLOW:<br>- ListOrders: central → MongoDB ListOrders (paginated, deviceId + time range filter)<br>- GetOrder: central → MongoDB GetOrder (by readingId)<br><br>After making all changes:<br>- Replace Order/Purchase domain with SensorReading domain<br>- Configure MQTT consumer to subscribe to sensors/+/readings wildcard<br>- Add MongoDB TTL index setup on startup<br>- Update application.yml with MQTT broker URL, Kafka topic, MongoDB config<br>- Update Docker Compose (Mosquitto MQTT broker, Kafka, MongoDB)<br>- Make sure all unit tests, integration and black-box tests pass<br><br>Please follow all patterns in CLAUDE.md and .claude/ exactly.<br>Run the tests after changes to verify everything works.</pre><p>Copied the full prompt and pasted it into OpenCode:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*nE62mihrFv2r1onTt-lX5A.png" /></figure><p>Now OpenCode knows exactly what to do — which architecture to follow and how to swap the initial Order domain for the sensor ingestion domain, using the AI readme files and the existing working implementation as a reference. This is the critical point: your model doesn’t need to be a very strong one, since it’s not creating something from scratch. All the dependencies, implementation, and tests are already in place, so it just needs to mirror the same pattern with the new domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*CFbrY8KATCCMhw-y3bvbiw.png" /></figure><p>Implementation finished, unit tests passed successfully, and OpenCode asked whether to run integration tests next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*cJuxIm6m_efe5dTNo1zaZw.png" /></figure><p>Fixed a few issues on the integration and black-box test side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*uB1Cf38vP17kGlYs39_QNA.png" /></figure><p>Meanwhile, as expected, Testcontainers spun up the Docker images for the backends while the integration and black-box tests ran.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m_dn-X7v83FZKA9fpG25sA.png" /></figure><p>A little more back-and-forth fixing the integration tests, and then</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*GZDhUgawtvXX7SxNxLQYSA.png" /></figure><p>all done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*QWr_e7bgT51omHPbTAZyng.png" /></figure><p>Last question: “In the todo list, what’s left?” Reply: “Nothing left.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*ETP41Vj1daVe0ux4r2uUTQ.png" /></figure><p>Now it’s time for the cb-debug skill, for a human (me, right now) to do some topology debugging:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*1OBRpZGjAnVUgerpdDzMGA.png" /></figure><p>OpenCode started the backend and the app itself, so we’re good to go — opened <a href="http://localhost:8080/camelbee/index.html">http://localhost:8080/camelbee/index.html</a>,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8lROQZrGw3QPXagMJFEVwg.png" /></figure><p>clicked “Start Tracing” in the UI, and asked the AI to trigger a few successful scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*f90PQRvRM7DMN3EW4E_DMw.png" /></figure><p>Now I can see the whole message flow through the microservice, with each message showing up in the message panel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j5vzwtAMDMjsk3QNjwCmCQ.png" /></figure><p>OpenCode also logged the details of what it triggered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*yH0kg0vdFrUpxYGnljT1dw.png" /></figure><p>Another request: “Can you please trigger one failure case?”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*9WCh-efcH9ot7WJstxPXWw.png" /></figure><p>Now I can also see the failing message land in CamelBee’s global error handler route,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KsOe3xV3GAi-o1ovGQKObg.png" /></figure><p>with the AI logging the failure details too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*zg0IftV8hzcbT02cwFV_VA.png" /></figure><p>Time to stop the debugging session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*sLTVdwHnHKVnmHy3HekqcA.png" /></figure><p>Let’s push a bit further on code coverage and review — first, list all the CamelBee skills,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*ScWHTbNsaH8K1vtqzMkoMA.png" /></figure><p>then run cb-coverage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*QGtav5xAhknYM7O-ujbXEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*-15H3sSEqHZTns41Rd4D4w.png" /></figure><p>Not enough tests to hit 80% coverage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*iRqQbPCKa_lt951eS55Wog.png" /></figure><p>Asked the AI to add more tests to get there</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*yUnxjTTtrYtVS6WrMvfPLQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*yUnxjTTtrYtVS6WrMvfPLQ.png" /></figure><p>and now we’re good.</p><p>Time for a review with Claude Code — Sonnet 5. I opened another terminal in the same project folder, ran claudecode, selected Sonnet 5, and since we&#39;re in the project folder Claude also picks up the skills automatically. Asked it to run cb-code-review.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*4I7nfv7Z-glOcZbu8R4xYA.png" /></figure><p>Claude Code review result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*57pmuqtk5x5rMim7Ojyndg.png" /></figure><p>Pasted Claude’s code review results into OpenCode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*9yZOFwz_nnQ3upQN7px2mw.png" /></figure><p>OpenCode fixed the review comments,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*7LvNEQBwlM_-IJGKvTbHlg.png" /></figure><p>then ran the tests again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*6MA-sVkFDiN4p2G1emOwBw.png" /></figure><p>Asked Claude once more: “All items completed, can you please review again?”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*1YazVNQ6wUbPPBUl4msWig.png" /></figure><p>We’re complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*DJhL64RWmgr4LPiRMjzfHw.png" /></figure><p>Code lives at <a href="https://github.com/camelbee/camelbee-examples/tree/main/recipes/sensor-ingestion">https://github.com/camelbee/camelbee-examples/tree/main/recipes/sensor-ingestion</a>.</p><p>The live topology viewer ships with <a href="https://www.camelbee.io/">CamelBee</a> — an Apache Camel scaffolding and visualization tool with an MCP server and a recipe library for Spring Boot and Quarkus. Generated projects include three layers of tests out of the box, which is the other half of why this workflow holds together.</p><p>Same pattern as before — a solid scaffold, a couple of prompts, and the model just had to follow the shape that was already there. Whether it’s an IoT ingestion pipeline or something else entirely, the actual “coding” part barely matters once the rails are laid down.</p><p>If you want to see this same idea applied to a completely different domain — reviewing AI-generated code by watching it flow through the topology instead of reading it line by line — I wrote about that with a Loan Application Service recipe here: <a href="https://medium.com/@egekaraosmanoglu/i-review-ai-code-by-watching-it-flow-not-reading-it-c74c05937885">I Review AI Code by Watching It Flow, Not Reading It</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c61659fcc0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Review AI Code by Watching It Flow, Not Reading It]]></title>
            <link>https://medium.com/@egekaraosmanoglu/i-review-ai-code-by-watching-it-flow-not-reading-it-c74c05937885?source=rss-a229dea17627------2</link>
            <guid isPermaLink="false">https://medium.com/p/c74c05937885</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[apache-camel]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Ege Karaosmanoglu]]></dc:creator>
            <pubDate>Tue, 19 May 2026 05:06:56 GMT</pubDate>
            <atom:updated>2026-05-19T05:06:56.602Z</atom:updated>
            <content:encoded><![CDATA[<p>When a live route topology shows you which branches fired, reading source code becomes the slow path — a walkthrough using a real loan-application microservice.</p><p>Three prompts to Claude Code. Three screenshots. The entire routing logic of a loan-application microservice — auto-approve, auto-reject, credit-bureau assessment — read off a live topology map without opening a single source file.</p><p>The claim is not “IDEs are dead.” Nobody who has touched real backend Java code believes that. The claim is narrower and, I think, more interesting: <strong>for the specific shape of work where you’re driving an AI agent through transformations on a service whose architecture is already in place, the IDE has quietly stopped being the center of the workflow.</strong></p><p>What replaced it isn’t one tool — it’s two feedback loops that, between them, cover most of the jobs the IDE used to do. The AI agent has a passing test suite as its oracle: make a change, run the tests, the green/red answer comes back without the agent having to reason about whether the change was right. I have the running service’s live route topology as mine: make a request, watch which routes light up, see exactly which branches fired without reading a stack trace.</p><p>Both loops trade inference for observation. Once both are in place, a surprising number of the things you used an IDE for turn out to have been inference-machinery in disguise.</p><p><strong>If you’d rather watch than read</strong>, here is the workflow recorded live — building, exercising, and visually inspecting a real loan-application microservice without an IDE in sight:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FK-Qm1NyGqUk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DK-Qm1NyGqUk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FK-Qm1NyGqUk%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a555d84c6cf509130a3204c50b2ea37e/href">https://medium.com/media/a555d84c6cf509130a3204c50b2ea37e/href</a></iframe><p>Let me unpack what’s actually going on.</p><p><strong>What an IDE Was Actually Doing for You</strong></p><p>Forget the marketing pages. In day-to-day backend work, an IDE does roughly six jobs:</p><p>1. <strong>Navigate the code</strong>— jump to definition, find usages, show the call graph.<br>2. <strong>Write the code</strong> — autocomplete, type hints, refactor support.<br>3. <strong>Verify the code typechecks </strong>— red squigglies, build feedback.<br>4. <strong>Run tests</strong>— green/red bar, jump to failures.<br>5. <strong>Debug at runtime</strong> — breakpoints, watch expressions, step through.<br>6. <strong>Visualize the architecture </strong>— usually not the IDE; usually a whiteboard or a Confluence page that’s three months out of date.</p><p>The first five used to be inseparable. The IDE was the only place you got them at once, so the IDE was where the work happened. The sixth was always a separate problem nobody really solved.</p><p>The point of this post is that for the AI-driven workflow on Spring Boot/Camel services, jobs 1, 2, 4, and 5 have new and arguably better homes — and job 6, the one IDEs never really did, has finally landed somewhere useful.</p><h3><strong>Where Each Job Went</strong></h3><p><strong>Navigation. </strong>When the agent is doing the reading, the agent already has the call graph in its head. When I’m doing the reading, I’m reading API contracts and the route topology — not source files. The OpenAPI spec tells me every endpoint. The Avro schemas tell me every event payload. The topology view tells me every route and how they connect. Those three artifacts cover most of the “what does this service actually do” question that I used to answer by chasing references in IntelliJ.</p><p><strong>Writing. </strong>The agent writes. I describe and review. My typing surface area collapsed by about 90%, and the part that remains is in a chat window, not an editor.</p><p><strong>Typecheck.</strong> `./mvnw compile` from a terminal does this. The agent runs it, reads the errors, fixes them, runs it again. I don’t sit in front of red squigglies — I read a summary of “compile clean” or “three errors, all fixed.”</p><p><strong>Tests.</strong> Same story. `./mvnw test` (or `failsafe:integration-test`, or `verify -Pblack-box-test`) from a terminal, with the agent treating the output as feedback. The green-bar dopamine moved from the IDE to the terminal. I miss it slightly less than I expected to.</p><p><strong>Debug at runtime.</strong> This is the one that matters most, and it’s the most interesting reframing. The IDE debugger was always optimized for <strong>imperative code </strong>— step into a method, watch a local variable, see the stack. That model doesn’t fit Camel particularly well. A Camel service is a topology of routes exchanging messages, and stepping through a `process(Exchange)` call with a breakpoint never told you the thing you actually wanted to know: <strong>which branch fired, and why?</strong></p><p>A live route-topology viewer answers exactly that question. Which is what I want to show you.</p><p><strong>Architecture visualization. </strong>This is the slot the IDE never filled. A topology viewer that updates in real time as messages flow through the service does. It’s not just documentation; it’s the system’s truthful self-portrait.</p><h3>A Walkthrough: Reviewing the Loan-Application Service Without an IDE</h3><p>The example I’ll use is the loan-application microservice — Spring Boot + Apache Camel, with REST, MCP, and Kafka entry points, JPA + Redis + Kafka + an external REST backend, three-path content-based routing, cache-aside reads.</p><p>Code lives at <strong>[github.com/camelbee/camelbee-examples]</strong>(<a href="https://github.com/camelbee/camelbee-examples/tree/main/recipes/loan-application-service"><strong>https://github.com/camelbee/camelbee-examples/tree/main/recipes/loan-application-service</strong></a>).</p><p>I’m going to walk through reviewing and exercising this service the way I actually did it — from the terminal and the browser, without ever opening IntelliJ.</p><h3>Step 1 — What is this service?</h3><p>Ask Claude Code to run skill /cb-debug — that brings up the app and all its backends in under a minute.</p><p>Then open `<a href="http://localhost:8080/camelbee/index.html%60">http://localhost:8080/camelbee/index.html`</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3y9ynB7emtj1BSsPJ-64DA.png" /></figure><p>In one screen I can see every interface, every backend, every central route, and how they connect. No source file open. No “where is this method called from?” round trip. This is the architectural overview that, on every previous project, I’d been trying to draw on a whiteboard from memory.</p><h3>Step 2 — Submit a small low-risk loan (auto-approve path)</h3><p>Ask Claude Code: <em>please submit a small low-risk loan (auto-approve path)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2eQk8LjJadMdgJkIE7HnSw.png" /></figure><p>The picture tells me: low risk, small amount, approved instantly, no external bureau call. I didn’t read a single line of source code to know this. The topology *is* the explanation.</p><h3>Step 3 — Submit a low-score loan (auto-reject path)</h3><p>Same service, different applicant — this time a credit score that triggers the rejection path immediately.</p><p>Ask Claude Code: <em>please submit a low-score loan (auto-reject path)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CmZnPEkn1OONDwxIMFbUsw.png" /></figure><p>Different branch, same downstream backends. The two-screenshot diff is the entire story of the routing logic.</p><h3>Step 4 — Submit a middle-of-the-road loan (credit-bureau assessment path)</h3><p>Ask Claude Code: <em>please submit a middle-of-the-road loan (credit-bureau assessment path)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Swsrn0KZWa8cZf_PZd7jKQ.png" /></figure><p>This is the path that <strong>does</strong> call the external bureau, and the topology shows it firing. In an IDE-debugger world, confirming this involved breakpoints and probably a logger statement or two. Here it&#39;s a screenshot.</p><p>Three requests, three visibly different branches — the entire routing logic read off the topology rather than the source code.</p><h3>What the IDE Still Wins At</h3><p>Being fair: there are jobs an IDE still does better.</p><p><strong>Cold-reading an unfamiliar codebase without an AI agent.</strong> If you’re parachuted into a repo with no context and no agent, an IDE with good navigation is still the fastest way in. The framing of this post assumes you have an AI agent paired with the work — without one, the calculus is different.</p><p><strong>Writing isolated, complex business logic.</strong> If the work is a single class with intricate algorithmic logic and no surrounding architecture, the IDE’s autocomplete and refactor support is genuinely valuable. Most backend work isn’t this; some is.</p><p><strong>Step-through debugging of imperative code.</strong> Camel’s value is that there isn’t much imperative code to step through — the routing logic is declarative. For the parts that *are* imperative (custom processors), a breakpoint still wins. I just don’t reach for it often.</p><p><strong>Refactoring large amounts of hand-written code. </strong>Rename-symbol across 200 files is still an IDE strength. Though increasingly, “ask the agent to rename it and run the tests” is competitive.</p><p>The honest framing is that the IDE has moved from <strong>the center of the workflow</strong> to <strong>one tool I occasionally reach for</strong> — I open it maybe once a week now, not eight hours a day.</p><h3>Why This Matters</h3><p>The reason this shift matters isn’t ergonomics. It’s that <strong>the source of truth has moved</strong>.</p><p>For thirty years the source code was the truth, and the IDE was the room where the truth lived. Tests verified the truth, runtime checked the truth, but the code was the thing. You read it, you edited it, you reasoned about it.</p><p>In an AI-driven, scaffolded, contract-first workflow, the source code is one expression of the truth among several. The OpenAPI spec is another. The Avro schemas are another. The route topology *as it actually runs* is another. The test suite is another. None of them is canonical on its own. The IDE was optimized for a world where one of them — the source — dominated. That world is ending for a specific category of work, and the loan-application service in this post is a working example of what that looks like.</p><p>This is also why AI-assisted work on a scaffolded service moves so much faster than AI-assisted work on an empty directory: the work is no longer about getting the code right in isolation. It’s about keeping multiple verified expressions of the system aligned with each other. The IDE was built for the first job. The browser tab with the topology, the terminal with the test output, and the chat with the agent are built for the second.</p><p>I didn’t plan to stop reading the code. I just noticed at some point that the topology was already telling me everything I needed.</p><ul><li>The loan-application-service referenced above lives at <strong>[github.com/camelbee/camelbee-examples]</strong>(<a href="https://github.com/camelbee/camelbee-examples/tree/main/recipes/loan-application-service"><strong>https://github.com/camelbee/camelbee-examples/tree/main/recipes/loan-application-service</strong></a>).</li><li>The live topology viewer ships with [CamelBee](<a href="https://www.camelbee.io/"><strong>https://www.camelbee.io</strong></a>) — an Apache Camel scaffolding and visualization tool with an MCP server and a recipe library for Spring Boot and Quarkus. Generated projects include three layers of tests out of the box, which is the other half of why this workflow holds together.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c74c05937885" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Guardrailing Claude Code to Build Production-Ready MCP Servers]]></title>
            <link>https://medium.com/@egekaraosmanoglu/guardrailing-claude-code-to-build-production-ready-mcp-servers-e3b844ea2587?source=rss-a229dea17627------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3b844ea2587</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Ege Karaosmanoglu]]></dc:creator>
            <pubDate>Wed, 08 Apr 2026 09:34:06 GMT</pubDate>
            <atom:updated>2026-04-08T14:54:36.715Z</atom:updated>
            <content:encoded><![CDATA[<p>AI coding assistants have a consistency problem. Without guardrails, they improvise — picking patterns at random, inventing configurations, producing code that compiles but quietly ignores your architecture. The output looks fine until someone who knows the codebase reads it.</p><p>The fix isn’t a better prompt. It’s structured constraints baked into the project itself.</p><p>I gave Claude Code one prompt inside a CamelBee-generated project. Twenty-one minutes later: a fully working MCP server — routes, domain models, mappers, audit logging, unit tests, integration tests, black-box tests, native build config, Docker Compose, OpenAPI spec. Everything. Zero manual corrections. Not a single line written by me.</p><p>Not because the AI got lucky. Because it had no room to improvise.</p><p>Here’s exactly how it worked.</p><h3>Scaffolding the Project</h3><p>Ten seconds on camelbee.io. MCP interface, REST backend, JPA/PostgreSQL for writes, Quarkus runtime. Click generate.</p><p>A complete project lands — routes, tests, TestContainers integration, Docker Compose with PostgreSQL, and a CLAUDE.md that already knows the full architecture. Not a skeleton. A real, running service with working MCP tools, REST backend calls, JPA persistence, and full test coverage out of the box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c_08xe0Q7FMfWkuee4Z2xA.png" /></figure><p>I imported it into IntelliJ. Compiled clean. All tests passed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lE3RWq03WlsGKlYrkO54zg.png" /></figure><p><strong>Unit tests pass :</strong></p><pre>./mvnw test</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CpMvbI3BztzREKldK1rOfw.png" /></figure><p><strong>Integration tests</strong> (TestContainers spins up all backends automatically):</p><pre>./mvnw jacoco:prepare-agent failsafe:integration-test failsafe:verify surefire-report:failsafe-report-only jacoco:report</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dfqGMbmn8wE4voF4eq0q2Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*SMAJOLMpBxlvVNSeqLOvMQ.png" /></figure><p><strong>Black-box tests</strong> (build the jar first, then TestContainers spins up the backends <em>and</em> the microservice itself in a container — real-life testing):</p><pre>chmod +x mvnw<br>./mvnw package -DskipTests</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ALDKf_BsKrKzqgAoSaMq2g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*T09K9Thw3jgSyA5dZr5w8A.png" /></figure><p>I pushed it to GitHub without touching a single file, so you can see exactly what the generator produces before any customization:</p><p>Git commit:</p><p><a href="https://github.com/camelbee/camelbee-examples/commit/d591f221f30685906b6c4a12e481ac1337c56dcc">https://github.com/camelbee/camelbee-examples/commit/d591f221f30685906b6c4a12e481ac1337c56dcc</a></p><h3>One Claude Code Prompt</h3><p>Here’s where it gets interesting.</p><p>The generated project includes a CLAUDE.md and .claude/ directory documenting every architectural pattern, naming convention, and framework constraint. This isn’t documentation for humans — it’s structured context for AI coding assistants.</p><p>I opened Claude Code in the project directory and gave it one prompt:</p><pre>I need to transform this generated microservice into a Product Catalog <br> MCP server with audit logging. Here&#39;s what I need: <br> <br> DOMAIN: <br> - Replace the Order/Purchase domain with Product catalog domain <br> - Product has: id, name, description, category, price, currency, <br> inStock (boolean), imageUrl <br> - Products API supports pagination: page, pageSize, totalPages, <br> totalItems <br> - Add a ProductSearchCriteria: query (text search), category filter,<br> minPrice, maxPrice, inStock filter <br> <br> AUDIT LOGGING: <br> - Create an AuditLog entity for JPA: id (auto-generated),<br> userId (string), toolName (string), parameters (JSON string), <br> timestamp (Instant), responseStatus (SUCCESS/FAILURE) <br> - Every MCP tool call should be audit-logged to PostgreSQL <br> before returning the response <br> - The userId comes from the MCP call metadata<br> <br> MCP TOOLS TO EXPOSE:<br> - listProducts: paginated product listing (page, pageSize params) <br> - searchProducts: filtered search (query, category, minPrice, <br> maxPrice, inStock, page, pageSize) <br> - getProduct: single product by ID <br> <br> REST BACKEND: <br> - GET /products?page={page}&amp;pageSize={pageSize} → paginated list<br> - GET /products/search?query={q}&amp;category={cat}&amp;minPrice={min} <br> &amp;maxPrice={max}&amp;inStock={bool}&amp;page={page}&amp;pageSize={pageSize} <br> - GET /products/{id} → single product<br> <br> FLOW FOR EACH OPERATION: <br> 1. MCP consumer receives tool call<br> 2. Central route orchestrates: <br> a. Call REST backend to get product data <br> b. Call JPA backend to write audit log <br> 3. Return product data to the AI agent <br> <br> After making all changes:<br> - Make sure all unit tests, integration and black-box tests pass <br> - Update the OpenAPI spec if needed <br> - Add new model classes to ReflectionConfig.java for native build<br> - Update application.yml with any new configuration <br> - Update Docker Compose files if needed<br> <br> Please follow all patterns in CLAUDE.md and .claude/ exactly.<br> Run the tests after changes to verify everything works.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V3No9C6OZS9Pt2OsX-4sew.png" /></figure><p>Claude Code read the CLAUDE.md, understood the 3-layer architecture, and got to work. It picked up framework-specific requirements directly from the standards documented in the project. It applied the correct error handling patterns on central and producer routes exactly as specified. It registered new model classes for native compilation without being told.</p><p><strong>It didn’t know any of this from training data alone — it knew because the architectural standards were right there in the project.</strong></p><p>After 21 minutes it was done. Not just routes — the full picture: domain models, mappers, MCP tool definitions, REST backend calls, JPA audit logging, unit tests, integration tests, black-box tests, updated OpenAPI spec, reflection config entries for native build, and updated Docker Compose. Zero manual corrections. I committed exactly what Claude Code produced.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QUdeocsOHxo1oZ9s3G_2rw.png" /></figure><p>Claude Output:</p><pre>⏺ All tests pass across all three levels:                                                                                                                       <br>                                                                                                                                                                <br>  - Unit tests: 14 passed                                                                                                                                       <br>  - Integration tests: 6 passed                                                                                                                                 <br>  - Black-box tests: 4 passed                                                                                                                                   <br>                                                                                                                                                                <br>⏺ All tasks complete. Here&#39;s a summary of the transformation:<br>                                                                                                                                                                <br>  Summary                                                                                                                                                       <br>                                                                                                                                                                <br>  Domain Replacement (Order/Purchase → Product Catalog + Audit Log)                                                                                             <br>                                                                                                                                                                <br>  New Domain Models:                                                                                                                                            <br>  - Product — id, name, description, category, price, currency, inStock, imageUrl<br>  - ProductPage — products list + page, pageSize, totalPages, totalItems                                                                                        <br>  - ProductSearchCriteria — query, category, minPrice, maxPrice, inStock                                                                                      <br>  - AuditLog (JPA entity) — id, userId, toolName, parameters, timestamp, responseStatus (SUCCESS/FAILURE)                                                       <br>                                                                                                                                                                <br>  MCP Tools (3 operations):                                                                                                                                     <br>  - listProducts — paginated product listing                                                                                                                    <br>  - searchProducts — filtered search with query, category, price range, stock filter                                                                            <br>  - getProduct — single product by ID                                                                                                                           <br>                                                                                                                                                                <br>  Route Architecture (3-layer preserved):                                                                                                                       <br>  - Consumer: McpConsumerRoute → 3 routes mapping MCP ↔ Domain                                                                                                  <br>  - Central: CentralListProductsRoute, CentralSearchProductsRoute, CentralGetProductRoute — each calls REST backend then writes audit log via JPA               <br>  - Producer: RestProducerRoute (3 REST backend routes), JpaProducerRoute (audit log writer)                                                                    <br>                                                                                                                                                                <br>  Audit Logging: Every MCP tool call is audit-logged to PostgreSQL (CAMELBEE_AUDIT_LOG table) with userId, toolName, parameters, timestamp, and response status.<br>                                                                                                                                                                <br>  Tests (24 total, all passing):                                                                                                                                <br>  - 14 unit tests (mapper + route tests)                                                                                                                        <br>  - 6 integration tests (MCP interface with real backends via TestContainers)                                                                                   <br>  - 4 black-box tests (fully dockerized end-to-end)                          <br>                                                                                                                                                                <br>✻ Brewed for 21m 8s</pre><p>Git commit:</p><p><a href="https://github.com/camelbee/camelbee-examples/commit/0fbed63803dadc9041580ae674f8d1075c35e835">https://github.com/camelbee/camelbee-examples/commit/0fbed63803dadc9041580ae674f8d1075c35e835</a></p><h3>The Architecture</h3><p>Before diving into the code — the shape of what got built.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_yW7p8irQxJKfnVqoUPc-g.png" /></figure><p>MCP consumer layer receives the tool call. A central orchestration route fans out to two backends: REST for product data, JPA for writing the audit record. Every request flows through that central route regardless of where it came from — MCP, a direct REST call, Kafka. The route doesn’t care. That’s the whole architecture.</p><p>One place to orchestrate. One place to add cross-cutting concerns. Backends that stay completely decoupled from each other. Same pattern whether you have two backends or ten.</p><h3>The Code</h3><p>The full source is on GitHub. Here’s the central orchestration route — the heart of the service:</p><pre>from(&quot;direct:centralListProducts&quot;).routeId(&quot;centralListProductsRoute&quot;)<br>        .setProperty(Constants.ORIGINAL_BODY, body())<br>        .process(exchange -&gt; {<br>          ValidationUtils.validateNumericHeader(exchange, &quot;page&quot;, 1, Integer.MAX_VALUE);<br>          ValidationUtils.validateNumericHeader(exchange, &quot;pageSize&quot;, 1, 100);<br>        })<br>        .to(&quot;direct:listProductsRest&quot;).id(&quot;listProductsRestEndpoint&quot;)<br>        .process(exchange -&gt; {<br>          String params = String.format(&quot;{\&quot;page\&quot;:%s,\&quot;pageSize\&quot;:%s}&quot;,<br>              exchange.getIn().getHeader(&quot;page&quot;),<br>              exchange.getIn().getHeader(&quot;pageSize&quot;));<br>          AuditLog auditLog = AuditLog.builder()<br>              .userId(exchange.getIn().getHeader(&quot;userId&quot;, String.class))<br>              .toolName(&quot;listProducts&quot;)<br>              .parameters(params)<br>              .timestamp(Instant.now())<br>              .responseStatus(ResponseStatus.SUCCESS)<br>              .build();<br>          exchange.setProperty(&quot;auditLog&quot;, auditLog);<br>          exchange.getIn().setBody(auditLog);<br>        })<br>        .to(&quot;direct:writeAuditLogJpa&quot;).id(&quot;writeAuditLogJpaEndpoint&quot;)<br>        .setBody(exchangeProperty(Constants.ACTUAL_RESPONSE_BODY));</pre><p>Two backend calls, one route. Fetch the product data, log the audit record. Whether the request came from an AI agent via MCP, a REST call, or a Kafka message — this route doesn’t care. That’s the power of having a single orchestration layer that stays completely decoupled from how requests arrive.</p><h3>Verifying with CamelBee</h3><p>Before deploying, I wanted to see the actual message flow — not just trust that the tests passed.</p><p>The generated project includes CamelBee, an open-source library that embeds a live visualization UI directly in your service. One dependency, no external application.</p><p>I triggered the built-in /cb-debug skill directly in Claude Code. It handled everything — backends, microservice, Docker — and opened the CamelBee debugger at http://localhost:8080/camelbee/index.html ready to trace live traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_yW7p8irQxJKfnVqoUPc-g.png" /></figure><p>As you can see, /cb-debug spins up all backends and the microservice in Docker with a single command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*lNAWzkBCOSH2Hc8su4t3fA.png" /></figure><p>Clicked “Start Tracing”, then asked it to trigger a successful listProducts call. Every hop lit up — MCP consumer, central route, REST backend, JPA audit log. Exactly what I designed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TOefsYIst0SwHWOeU4-i9A.png" /></figure><p>Then I asked it to trigger an error case. The failure showed up immediately in the UI — which step, which route, which message. No log diving, no guessing.</p><p>This matters more for AI-generated code than for handwritten code. When a human writes a route, they have a mental model of what should happen. When AI writes it, you need to <em>see</em> it running to actually trust it. CamelBee closes that gap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sSbMbIzz3nZ2u1shQKklhw.png" /></figure><h3>Verifying What the AI Actually Wrote</h3><p>AI-generated code has a trust problem that passing tests don’t fully solve. When an agent produces 21 minutes worth of routes, models, mappers, and tests — you need more than a green build to trust it.</p><p>Just like /cb-debug gives you live message flow visibility, the built-in /cb-coverage skill gives you test coverage visibility. I ran it and got a full breakdown by class and line — unit tests and integration tests combined.</p><p>Here’s what that looked like after Claude Code’s initial implementation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*mu6kGuTCZYWFAFVt.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*4LLbUSW_0n1Rckmc.png" /></figure><p>The initial coverage sat at 65% — below the 80% threshold for some route logic and mapper edge cases. I asked Claude Code directly:</p><blockquote><em>“Coverage is below 80% in these classes. Add tests to bring each one up.”</em></blockquote><p>It read the existing test patterns from the project, found the gaps, and added targeted test cases. Final coverage: 90%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*9cOsWOSWyOHoFyH0.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*CsFG0Wj5H1yj4Wmr.png" /></figure><p>The workflow becomes: generate → verify behavior in CamelBee → verify coverage in /cb-coverage → then build native.</p><p>That’s the difference between fast code and trustworthy code.</p><h3>Native Build — Serverless Ready</h3><p>After everything is implemented, reviewed, and tested, we can build the native image and run the black-box tests against the native executable running in a container.</p><p>MCP servers are request-driven — an AI agent calls when it needs data, then the server sits idle. Perfect for serverless. Quarkus compiles the entire service into a native executable:</p><pre>./mvnw package -Dnative -Dquarkus.native.container-build=true -DskipTests</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*iePZwwMNer-FLpYg.png" /></figure><p>Two minutes to build the native image. Now the real test — does everything still work?</p><p>Integration tests can’t run against a native binary, so this is where black-box tests earn their keep. They spin up the native image in Docker alongside the real backends and hit it over HTTP — exactly how it runs in production.</p><pre>./mvnw verify -Pblack-box-test -Dbbtest.native=true</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Hf_cgaquBPJB4YQW.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*5tnrtp44k4JcWo8c.png" /></figure><p>All passing. Startup time: ~50ms. An MCP server that cold-starts before the AI agent notices the latency. Deploy to AWS Lambda, Cloud Run, Azure Container Apps — wherever you run containers.</p><p>At this point your MCP server is tested, verified, and native-compiled. You’re ready to ship.</p><p>The last step is the pipeline — and that’s another prompt away. Ask Claude Code for exactly what your environment uses:</p><blockquote><em>“Create a GitHub Actions pipeline with these stages: build, quality checks, unit tests, integration tests, SonarQube quality gate, build native Docker image, black-box tests against the running container, and deploy to AWS Lambda.”</em></blockquote><blockquote><em>“Create a GitLab CI pipeline with the same stages and deploy to OpenShift.”</em></blockquote><blockquote><em>“Create a Jenkins pipeline with the same stages and push the Docker image to Nexus.”</em></blockquote><p>Claude Code generates a pipeline that actually fits your project — the Maven commands, test profiles, and Docker build flags are all already documented in CLAUDE.md, so it doesn’t guess. The black-box test stage even knows to spin up the native image in Docker and run the full test suite against it, exactly as you did locally.</p><p>That’s the full loop: <strong>generate → prompt → verify behavior → verify coverage → build native → deploy.</strong></p><p>From zero to a production-ready MCP server your AI agents can call — in an afternoon.</p><h3>The Bigger Picture</h3><p>The challenge with AI-assisted development has never been whether AI can write code — it’s whether it writes the right code. Without guardrails, AI coding assistants improvise. They pick random patterns, invent configurations, and produce code that compiles but doesn’t follow your architecture.</p><p>What made this work wasn’t the AI — it was the constraints. The CLAUDE.md and .claude/ directory defined the rules, but equally important was the generated code itself. The existing routes, mappers, tests, and configuration served as living reference patterns. Claude Code didn’t just follow written rules — it followed working examples.</p><p>The result: 21 minutes from prompt to working MCP server — routes, models, mappers, tests, configuration — with zero manual corrections. That’s not a demo. That’s a workflow.</p><p>CamelBee generates projects with these guardrails built in. Pick your framework — Spring Boot, Quarkus, or Quarkus Native — pick your interfaces and backends, and you get a production-ready starting point that both humans and AI assistants can build on confidently.</p><p>That’s the workflow: <strong>generate, prompt, verify, deploy.</strong></p><h3>Try It Yourself</h3><p>🔗 Full example: <a href="https://github.com/camelbee/camelbee-examples/tree/main/mcp-servers/product-catalog-mcp">https://github.com/camelbee/camelbee-examples/tree/main/mcp-servers/product-catalog-mcp</a></p><p>🔗 CamelBee (open source, Apache 2.0): <a href="https://github.com/camelbee/camelbee">https://github.com/camelbee/camelbee</a></p><p>🔗 Generate your own: <a href="https://camelbee.io/">https://www.camelbee.io</a></p><p>If you’re building services that AI agents need to call — and increasingly, most services will be — MCP + Apache Camel is a stack worth looking at.</p><p>— — <br>This is the second post in a series about Apache Camel and AI-assisted development. The first post, about why Camel’s architecture is a natural fit for AI code generation, is<br><a href="https://medium.com/@egekaraosmanoglu/apache-camel-was-already-great-ai-makes-it-even-better-e1bb4a3b572b">https://medium.com/@egekaraosmanoglu/apache-camel-was-already-great-ai-makes-it-even-better-e1bb4a3b572b</a>.</p><p>— -</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3b844ea2587" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apache Camel Was Already Great. AI Makes It Even Better.]]></title>
            <link>https://medium.com/@egekaraosmanoglu/apache-camel-was-already-great-ai-makes-it-even-better-e1bb4a3b572b?source=rss-a229dea17627------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1bb4a3b572b</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[apache-camel]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Ege Karaosmanoglu]]></dc:creator>
            <pubDate>Tue, 17 Mar 2026 07:55:03 GMT</pubDate>
            <atom:updated>2026-03-17T08:41:33.035Z</atom:updated>
            <content:encoded><![CDATA[<p>There’s a quiet reason Apache Camel is becoming one of the best frameworks for AI-assisted development — and it’s not marketing. It’s architecture. While the industry debates which stack survives the AI coding wave, Camel has been sitting on a structural advantage for years without anyone calling it out.</p><p>Let’s talk about why.</p><h3>The AI Code Generation Problem Nobody Talks About</h3><p>AI coding assistants like Claude Code are genuinely impressive at generating integration logic. But there’s a catch most developers hit quickly: the quality of generated code is only as good as the consistency of the patterns the AI has to work with.</p><p>Frameworks with sprawling APIs, multiple ways to do the same thing, or heavy configuration-over-convention approaches produce inconsistent AI output. You get code that works sometimes, requires heavy prompting to steer, and still needs careful line-by-line review before you trust it.</p><p>Apache Camel doesn’t have this problem.</p><h3>Why Camel and AI Are a Natural Fit</h3><p>Apache Camel was designed around a single core idea: <strong>every integration follows the same pattern</strong>. Consume from a source, process, route to a destination. Whether you’re reading from Kafka, calling a REST API, writing to a database, publishing to AMQP, or invoking a SOAP service — the DSL looks structurally identical.</p><p>consumer route (rest api):</p><pre>    rest().openApi().specification(&quot;openapi/order-api.yaml&quot;).missingOperation(&quot;ignore&quot;);<br><br>    from(&quot;direct:createOrder&quot;)<br>        .routeId(&quot;createOrderOperationRoute&quot;)<br>        .process(this::setOriginalContentTypeProperties)<br>        .unmarshal(orderFormat)<br>        .to(&quot;bean-validator://camelbee&quot;)<br>        .convertBodyTo(com.mycompany.model.domain.Order.class)<br>        .to(&quot;direct:centralCreateOrder&quot;)<br>        .convertBodyTo(Order.class)<br>        .marshal(dataFormat)<br>        .process(this::setOriginalContentTypePropertiesBack)<br>        .setHeader(HTTP_RESPONSE_CODE, constant(201));</pre><p>central business route:</p><pre>from(&quot;direct:centralCreateOrder&quot;).routeId(&quot;centralCreateOrderRoute&quot;)<br>    .process(exchange -&gt; {<br>      Order order = exchange.getIn().getBody(Order.class);<br>      if (order.getItems() == null || order.getItems().isEmpty()) {<br>        throw new ValidationException(exchange, &quot;Order items cannot be empty!&quot;);<br>      }<br>    })<br>    .setProperty(Constants.ORIGINAL_BODY, body())<br>    .to(&quot;direct:createOrderRest&quot;).id(&quot;createOrderRestEndpoint&quot;)<br>    .to(&quot;direct:createOrderAmqp&quot;).id(&quot;createOrderAmqpEndpoint&quot;)<br>    .setBody(exchangeProperty(Constants.ACTUAL_RESPONSE_BODY));</pre><p>producer route:</p><pre>from(&quot;direct:createOrderRest&quot;).routeId(&quot;createOrderRestRoute&quot;)<br>    .removeHeader(Exchange.HTTP_PATH)<br>    .removeHeader(Exchange.HTTP_URL)<br>    .setHeader(Exchange.HTTP_METHOD, constant(&quot;POST&quot;))<br>    .setHeader(CONTENT_TYPE, constant(APPLICATION_JSON))<br>    .setHeader(HttpHeaders.ACCEPT, constant(APPLICATION_JSON))<br>    .convertBodyTo(com.mycompany.model.infra.json.Purchase.class)<br>    .marshal(dataFormat).to(&quot;http:{{backend-purchase-rest-api.url}}?bridgeEndpoint=true&quot;)<br>    .unmarshal(purchaseFormat)<br>    .convertBodyTo(com.mycompany.model.domain.Order.class)<br>    .setProperty(Constants.ACTUAL_RESPONSE_BODY, body());</pre><p>Look at those three routes. REST consumer, validation and orchestration, HTTP backend call. Three completely different integration concerns — but the structure is uniform throughout. from(), process, to(). Always.</p><p>This uniformity is exactly what AI code generation thrives on. Claude Code doesn’t need to context-switch between frameworks, guess at configuration conventions, or reason about bespoke abstractions. It generates correct, idiomatic Camel routes because the patterns are consistent, well-documented, and heavily represented in its training data.</p><p>The result: less prompting, more correct output, faster iteration.</p><h3>Low-Code by Design — Which Means Less to Review</h3><p>The declarative DSL doesn’t just help AI generate code. It helps humans review it.</p><p>A Camel route that handles REST ingestion, validation, orchestration to multiple backends, error handling and response mapping might be 30–40 lines of expressive DSL. The equivalent custom integration code — managing HTTP clients, thread safety, error propagation, retry logic — could easily be 300+ lines across multiple classes.</p><p>When AI generates 40 lines of Camel DSL, you can actually read it. You can verify the intent, check the routing logic, and confirm the behavior in minutes. That’s a fundamentally different review experience than auditing hundreds of lines of hand-rolled integration plumbing.</p><p>In the AI-assisted development era, <strong>readability isn’t just a nice-to-have — it’s your primary verification tool</strong>.</p><h3>The Runtime Picture: Where CamelBee Comes In</h3><p>Reading routes in your IDE gives you static understanding. But integration systems are dynamic — messages flow, routes chain together, errors propagate in unexpected ways. Understanding the runtime behavior across a full microservice, especially one AI generated, requires more than reading code.</p><p>This is where Apache Camel’s architecture has another hidden strength: <strong>built-in notifiers</strong>.</p><p>Camel exposes rich lifecycle hooks that fire as messages enter routes, traverse processors, and exit to endpoints. These hooks make it surprisingly natural to build real-time visualization tooling on top of the framework — the observability infrastructure is already there.</p><p>CamelBee uses exactly these notifiers to embed a live visualization UI directly inside your service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*X7hSqRZ6m-2H7aOv.png" /></figure><p><em>Live message tracing in CamelBee — green flows show successful paths, red shows error paths. Each numbered badge shows the message count at that point in the flow.</em></p><p>What you’re seeing in the screenshot:</p><ul><li><strong>Route topology</strong> auto-generated from your actual running routes — no configuration, no YAML, no manual diagramming</li><li><strong>Live message flow</strong> — the numbered green and red badges show messages moving through the system in real time</li><li><strong>Color-coded endpoints</strong> — REST (blue), CXF/SOAP (purple), HTTP (green), AMQP (orange), AWS (yellow) — instantly readable at a glance</li><li><strong>Full route graph</strong> — from consumer endpoints on the left, through orchestration routes in the middle, to backend integrations on the right</li></ul><p>This is your entire service architecture, live, in one view. Not a diagram someone drew six months ago. Not a PlantUML file that’s out of date. The actual running topology, traced in real time.</p><h3>One Dependency. No External App.</h3><p>Adding CamelBee to a Spring Boot project:</p><pre>&lt;dependency&gt;<br>  &lt;groupId&gt;io.camelbee&lt;/groupId&gt;<br>  &lt;artifactId&gt;camelbee-springboot-core&lt;/artifactId&gt;<br>&lt;/dependency&gt;</pre><p>For Quarkus:</p><pre>&lt;dependency&gt;<br>  &lt;groupId&gt;io.camelbee&lt;/groupId&gt;<br>  &lt;artifactId&gt;camelbee-quarkus-core&lt;/artifactId&gt;<br>&lt;/dependency&gt;</pre><p>That’s it. The embedded React UI is bundled and served directly from your service at /camelbee/index.html. No external application to deploy, no Docker image to run, no separate infrastructure to maintain.</p><h3>What Just Shipped</h3><p>This week the old WebGL 3D application was fully replaced with an embedded React UI. The previous version required running a separate CamelBee WebGL app or Docker container alongside your service — a real friction point for getting started.</p><p>The new embedded approach means the visualization lives exactly where your code lives. Start your service, open the debugger tab, start tracing. The entire feedback loop — write route, run service, verify behavior — is now seamless.</p><p>Both the core library and the React UI are fully open source under Apache 2.0:</p><p>🔗 Core library: <a href="https://github.com/camelbee/camelbee">github.com/camelbee/camelbee</a> 🔗 React UI: <a href="https://github.com/camelbee/camelbee/tree/main/ui">github.com/camelbee/camelbee/ui</a></p><h3>The Bigger Picture</h3><p>The frameworks that win in the AI-assisted development era won’t necessarily be the ones with the most features. They’ll be the ones where AI generates correct code consistently, where humans can verify that code quickly, and where the runtime behavior is observable without ceremony.</p><p>Apache Camel was designed for uniformity, readability, and observability long before AI coding assistants existed. That design is now a genuine competitive advantage.</p><p>If you’re building integration-heavy microservices and not using Camel — it’s worth a serious look. And if you’re already using Camel, CamelBee gives you the runtime visibility layer to complete the picture.</p><p><em>CamelBee is open source (Apache 2.0). Contributions welcome.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1bb4a3b572b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring Boot vs Quarkus: Which Java Runtime Wins the AI MCP Tools Performance Battle?]]></title>
            <link>https://medium.com/@egekaraosmanoglu/spring-boot-vs-quarkus-which-java-runtime-wins-the-ai-mcp-tools-performance-battle-4da9d6a248d5?source=rss-a229dea17627------2</link>
            <guid isPermaLink="false">https://medium.com/p/4da9d6a248d5</guid>
            <category><![CDATA[quarkus]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Ege Karaosmanoglu]]></dc:creator>
            <pubDate>Fri, 20 Feb 2026 12:41:13 GMT</pubDate>
            <atom:updated>2026-02-20T15:11:41.865Z</atom:updated>
            <content:encoded><![CDATA[<h3>Testing on Local Docker: 2 CPUs, 1GB Memory (JVM) / 256MB Memory (Native)</h3><p><em>A comprehensive performance analysis comparing 12 different MCP microservice configurations across Spring Boot MVC, Spring Boot WebFlux, Quarkus JVM, and Quarkus Native — measuring the real cost of MapStruct mappings and Apache Camel routing</em></p><h3>TL;DR</h3><p>We benchmarked <strong>12 different MCP (Model Context Protocol)</strong> microservice configurations across <strong>Spring Boot MVC, Spring Boot WebFlux, Quarkus JVM, and Quarkus Native</strong>, with three architecture variants each (Baseline, MapStruct mappings, Apache Camel + MapStruct). Here are the key findings:</p><p>🚀 <strong>Highest Throughput</strong>: Quarkus JVM Baseline — <strong>16,381 req/s</strong> — that’s <strong>65% faster</strong> than the best Spring Boot result</p><p>💾 <strong>Lowest Memory</strong>: Quarkus Native with Camel + MapStruct — <strong>118 MB</strong></p><p>⚡ <strong>Best Latency</strong>: Quarkus JVM Baseline — <strong>10.00ms median</strong> — half the latency of Spring Boot</p><p>🏗️ <strong>MapStruct Overhead</strong>: Minimal — less than <strong>±5%</strong> throughput impact across all runtimes</p><p>🔄 <strong>Camel Routing Overhead</strong>: <strong>8–21%</strong> throughput reduction — and Quarkus JVM with Camel (13,957 req/s) <em>still</em> beats every Spring Boot baseline</p><p>✅ <strong>Zero Failures</strong>: 100% success rate across all <strong>36 test runs</strong></p><p>All benchmark code, test scripts, configurations, and detailed results are available as open source on GitHub: 👉 <a href="https://github.com/camelbee/camelbee-examples">https://github.com/camelbee/camelbee-examples</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*uVeO4OsOYCpTU--nEpQfqA.png" /></figure><h3>Introduction</h3><p>Following our <a href="https://medium.com/@egekaraosmanoglu">previous benchmark comparing gRPC, REST+Protobuf, and REST+JSON across Apache Camel runtimes</a>, we received many questions about <strong>MCP (Model Context Protocol) performance</strong> — the increasingly popular protocol for AI agent-to-service communication.</p><p>More importantly, developers wanted to understand <strong>the real cost of architectural decisions</strong>: How much overhead does adding MapStruct data transformation introduce? What happens when you add Apache Camel routing on top? And how do these costs vary across runtimes?</p><p>To answer these questions, we benchmarked:</p><ul><li><strong>4 Runtimes</strong>: Spring Boot MVC, Spring Boot WebFlux, Quarkus JVM, Quarkus Native</li><li><strong>3 Architecture Variants</strong>: Baseline (plain), MapStruct mappings only, Apache Camel routing + MapStruct</li><li><strong>12 Total Configurations</strong>: Every combination tested on local Docker</li><li><strong>36 Test Runs</strong>: 3 runs per configuration for JVM warm-up and native consistency verification</li></ul><p>This article shares the findings with real performance metrics and actionable recommendations.</p><h3>Benchmark Results</h3><p><strong>12 configurations, 36 test runs, zero failures.</strong> Here’s how Spring Boot MVC, Spring Boot WebFlux, Quarkus JVM, and Quarkus Native stack up across three MCP tool implementations — from bare-metal baseline to full enterprise stack with Apache Camel routing and MapStruct DTO mapping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4dpQ3zzbFF53tkn7eGTg9Q.png" /></figure><h3>Test Setup</h3><h3>Environment</h3><ul><li><strong>Apache Camel</strong>: 4.16</li><li><strong>Quarkus</strong>: 3.30.0</li><li><strong>Spring Boot</strong>: 3.5.9</li><li><strong>Java</strong>: 21</li><li><strong>Platform</strong>: Local Docker containers</li><li><strong>CPU</strong>: 2 cores allocated per container</li><li><strong>Memory</strong>: 1GB (JVM runtimes) / 256MB (Native runtime)</li><li><strong>Container</strong>: Docker with resource limits</li><li><strong>Load Test Tool</strong>: k6</li><li><strong>Virtual Users</strong>: 200 concurrent</li><li><strong>Duration</strong>: 2 minutes per test</li><li><strong>Warm-up</strong>: 3 runs for JVM optimization; 3 runs for native to verify consistency</li><li><strong>Protocol</strong>: MCP over HTTP/SSE (JSON-RPC 2.0)</li><li><strong>Hardware</strong>: MacBook Pro M1</li></ul><h3>The Three Architecture Variants</h3><p>Each runtime was tested with three increasingly realistic architecture configurations:</p><p><strong>1. Baseline (Plain MCP)</strong></p><ul><li>Direct JSON-RPC request handling</li><li>No data transformation, no Camel routing</li><li>Minimal processing pipeline</li><li>Represents the theoretical maximum throughput for each runtime</li></ul><pre>// Quarkus<br><br>@Tool(description = &quot;Create a new order with customer details, product information, and shipping preferences&quot;)<br>Order createOrder(<br>@ToolArg(description = &quot;Order object containing salesChannel, items with productName, quantity, and price&quot;) Order order,<br>@ToolArg(description = &quot;Client-generated correlation ID for distributed tracing and logging&quot;, required = false) String transactionId,<br>@ToolArg(description = &quot;Business process correlation ID for end-to-end transaction tracing across systems&quot;, required = false) String businessTransactionId<br>) {<br><br>    Order response = new Order();<br>    response.setId(&quot;1&quot;);<br>    response.setSalesChannel(order.getSalesChannel());<br>    response.setItems(order.getItems());<br>    return response;<br><br><br>}<br><br>// Spring Boot<br><br>@McpTool(name = &quot;createOrder&quot;, description = &quot;Create a new order with customer details, product information, and shipping preferences&quot;)<br>Order createOrder(<br>@McpToolParam(description = &quot;Order object containing salesChannel, items with productName, quantity, and price&quot;) Order order,<br>@McpToolParam(description = &quot;Client-generated correlation ID for distributed tracing and logging&quot;, required = false) String transactionId,<br>@McpToolParam(description = &quot;Business process correlation ID for end-to-end transaction tracing across systems&quot;,<br>required = false) String businessTransactionId<br>) throws Exception {<br><br>    Order response = new Order();<br>    response.setId(&quot;1&quot;);<br>    response.setSalesChannel(order.getSalesChannel());<br>    response.setItems(order.getItems());<br>    return response;<br><br>}</pre><p><strong>2. MapStruct Mappings (No Camel)</strong></p><ul><li>JSON-RPC request handling with MapStruct</li><li>Two mapping operations per request (API → Domain → API)</li><li>No Apache Camel — direct framework handling</li><li>Measures the isolated cost of data transformation</li></ul><pre>// Quarkus<br><br>@Tool(description = &quot;Create a new order with customer details, product information, and shipping preferences&quot;)<br>Order createOrder(<br>@ToolArg(description = &quot;Order object containing salesChannel, items with productName, quantity, and price&quot;) Order order,<br>@ToolArg(description = &quot;Client-generated correlation ID for distributed tracing and logging&quot;, required = false) String transactionId,<br>@ToolArg(description = &quot;Business process correlation ID for end-to-end transaction tracing across systems&quot;, required = false) String businessTransactionId<br>) {<br><br>    com.mycompany.model.domain.Order domainOrder = mcpOrderMapper.mcpToDomainOrder(order);<br>    domainOrder.setId(&quot;1&quot;);<br>    return mcpOrderMapper.domainToMcpOrder(domainOrder);<br><br>}<br><br>// Spring Boot<br><br>@McpTool(name = &quot;createOrder&quot;, description = &quot;Create a new order with customer details, product information, and shipping preferences&quot;)<br>Order createOrder(<br>@McpToolParam(description = &quot;Order object containing salesChannel, items with productName, quantity, and price&quot;) Order order,<br>@McpToolParam(description = &quot;Client-generated correlation ID for distributed tracing and logging&quot;, required = false) String transactionId,<br>@McpToolParam(description = &quot;Business process correlation ID for end-to-end transaction tracing across systems&quot;,<br>required = false) String businessTransactionId<br>) throws Exception {<br><br>    com.mycompany.model.domain.Order domainOrder = mcpOrderMapper.mcpToDomainOrder(order);<br>    return mcpOrderMapper.domainToMcpOrder(domainOrder);<br><br>}</pre><p><strong>3. Apache Camel Routing + MapStruct</strong></p><ul><li>Full Apache Camel routing pipeline</li><li>MapStruct mappings within Camel routes</li><li>Content-based routing, error handling</li><li>Represents production-grade implementations with full Camel power</li></ul><pre>// Quarkus<br><br>@Tool(description = &quot;Create a new order with customer details, product information, and shipping preferences&quot;)<br>Order createOrder(<br>@ToolArg(description = &quot;Order object containing salesChannel, items with productName, quantity, and price&quot;) Order order,<br>@ToolArg(description = &quot;Client-generated correlation ID for distributed tracing and logging&quot;, required = false) String transactionId,<br>@ToolArg(description = &quot;Business process correlation ID for end-to-end transaction tracing across systems&quot;, required = false) String businessTransactionId<br>) {<br><br>        var result = fluentProducerTemplate<br>            .to(&quot;direct:mcpCreateOrder&quot;)<br>            .withHeader(&quot;transactionId&quot;, transactionId)<br>            .withBody(order)<br>            .send();<br><br>        if (result.getMessage().getBody() instanceof ToolCallException) {<br>          throw result.getMessage().getBody(ToolCallException.class);<br>        } else {<br>          return result.getMessage().getBody(Order.class);<br>        }<br><br>}<br><br>// Spring Boot<br><br>@McpTool(name = &quot;createOrder&quot;, description = &quot;Create a new order with customer details, product information, and shipping preferences&quot;)<br>Order createOrder(<br>@McpToolParam(description = &quot;Order object containing salesChannel, items with productName, quantity, and price&quot;) Order order,<br>@McpToolParam(description = &quot;Client-generated correlation ID for distributed tracing and logging&quot;, required = false) String transactionId,<br>@McpToolParam(description = &quot;Business process correlation ID for end-to-end transaction tracing across systems&quot;,<br>required = false) String businessTransactionId<br>) throws Exception {<br><br>      var result = fluentProducerTemplate<br>          .to(&quot;direct:mcpCreateOrder&quot;)<br>          .withHeader(&quot;transactionId&quot;, transactionId)<br>          .withBody(order)<br>          .send();<br><br>      if (result.getMessage().getBody() instanceof Exception) {<br>        throw result.getMessage().getBody(Exception.class);<br>      } else {<br>        return result.getMessage().getBody(Order.class);<br>      }<br><br>}</pre><h3>Request Type &amp; Data Transformation</h3><p>For the MapStruct and Camel+MapStruct variants, each MCP request goes through:</p><ol><li><strong>Incoming Request</strong> → Parse JSON-RPC message</li><li><strong>API to Domain Mapping</strong> → MapStruct conversion (API model → Domain model)</li><li><strong>Business Logic</strong> → Process in domain layer (mock backend)</li><li><strong>Domain to API Mapping</strong> → MapStruct conversion (Domain model → API model)</li><li><strong>Outgoing Response</strong> → Serialize JSON-RPC response</li></ol><p>This means <strong>two MapStruct mapping operations per request</strong>, simulating real-world scenarios where you maintain separation between API contracts and domain models.</p><h3>Configuration</h3><p>All tests were performed with:</p><ul><li>Apache Camel interceptors disabled for maximum performance</li><li>Mock backend (no external dependencies)</li><li>Optimized Docker resource allocation</li><li>Production-like settings</li></ul><h3>Performance Results</h3><h3>Overall Throughput Comparison (Requests/Second)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-HyFmuacgTDdEUv-2VkKvg.png" /></figure><blockquote><em>All results from Run 3 (JVM warm-up complete) for JVM runtimes. Quarkus Native results are consistent across all runs (&lt; 2.5% variance).</em></blockquote><p><strong>Key Insights:</strong></p><ul><li><strong>Quarkus JVM leads across all configurations</strong> — 55–65% higher throughput than Spring Boot</li><li>Even with full Camel overhead, <strong>Quarkus JVM (13,957 req/s) outperforms all Spring Boot baselines</strong></li><li>Spring Boot <strong>WebFlux provides ~5% throughput advantage</strong> over MVC across all configurations</li><li>Quarkus Native <strong>matches Spring Boot MVC throughput</strong> while using 72–84% less memory</li></ul><h3>Memory Usage Comparison (MB)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mF9Gz1dlVIszLNXcviUQuA.png" /></figure><p><strong>Key Insights:</strong></p><ul><li>Quarkus Native uses <strong>72–84% less memory</strong> than JVM-based runtimes</li><li>The full Camel + MapStruct configuration on Quarkus Native runs in just <strong>118 MB</strong> — the lowest in the entire benchmark</li><li>Spring Boot MVC has the most <strong>consistent memory footprint</strong> (556–572 MB)</li><li>Quarkus JVM uses slightly more memory than Spring Boot but delivers <strong>55–65% higher throughput</strong> — a worthwhile trade-off</li></ul><h3>Latency Comparison — Median (ms)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*poDay4LV2D9plTws5g5x0g.png" /></figure><p><strong>Key Insights:</strong></p><ul><li><strong>Quarkus JVM provides the lowest latency</strong> — even with Camel routing (11.15ms) it beats Spring Boot baseline (13.55ms)</li><li>MapStruct adds <strong>negligible latency</strong> (~0.05–0.52ms)</li><li>Camel routing adds <strong>~1ms on Quarkus JVM</strong>, ~0.2ms on Spring Boot MVC, and ~2.6ms on Native</li><li>Spring Boot MVC and WebFlux have <strong>remarkably consistent median latencies</strong> (13.38–13.77ms)</li></ul><h3>P95 Latency Comparison (ms)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ng5kLIgh9lUinikdazXCg.png" /></figure><p>Quarkus JVM P95 latencies (22–31ms) are <strong>dramatically lower</strong> than all other runtimes. Spring Boot WebFlux consistently beats MVC at P90/P95 tail latencies.</p><h3>The Real Cost of Architecture</h3><p>One of the most valuable insights from this benchmark is understanding the <strong>incremental cost of each architectural layer</strong>. This helps you make informed decisions about when complexity is worth the trade-off.</p><h3>Throughput Impact by Layer</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PR7FzChdIiQ8A4WwqZINcw.png" /></figure><p><strong>MapStruct is essentially free.</strong> The ±1–6% variation is within normal benchmark noise for most runtimes. You can use MapStruct for clean API/domain separation with zero performance concerns.</p><p><strong>Camel routing costs 8–21%.</strong> This is the price of a full routing pipeline with content-based routing, error handling, and extensibility. For most production systems, this is a worthwhile trade-off given the flexibility Camel provides. And crucially — <strong>Quarkus JVM with Camel (13,957 req/s) still outperforms every Spring Boot baseline.</strong></p><h3>Memory Impact by Layer</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ps4CmxE1R8CYQQa6to7Mw.png" /></figure><p>Interestingly, <strong>Quarkus Native with Camel+MapStruct uses the least memory of any configuration at 118 MB</strong>. This suggests the native compiler is particularly effective at optimizing Camel’s routing infrastructure. Spring Boot MVC actually shows a slight memory <em>decrease</em> with Camel, while Quarkus JVM memory remains remarkably stable.</p><h3>MCP vs Previous Protocols (gRPC, REST+Protobuf, REST+JSON)</h3><p>How does MCP compare to the protocols we benchmarked previously? Here’s a comparison using the Camel+MapStruct variant (most realistic production scenario):</p><h3>Throughput Comparison (Camel + MapStruct, Best Run)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1yo5V1mh3HSTVo_bgWZN8Q.png" /></figure><blockquote><em>Note: Spring Boot MCP uses MVC results; previous protocol benchmarks used Spring Boot (non-WebFlux).</em></blockquote><p><strong>Key Insights:</strong></p><ul><li><strong>MCP on Quarkus JVM (13,957 req/s) outperforms gRPC on the same runtime (11,010 req/s)</strong> — a surprising result</li><li>MCP on Spring Boot (9,188 req/s) performs <strong>between REST+Protobuf and gRPC</strong></li><li>MCP on Quarkus Native (7,861 req/s) <strong>exceeds all previous protocol results</strong> on that runtime</li><li>MCP’s JSON-RPC format provides excellent compatibility while maintaining competitive throughput</li></ul><h3>Spring Boot: MVC vs WebFlux — Does Reactive Matter for MCP?</h3><p>One unique aspect of this benchmark is the head-to-head comparison between Spring Boot MVC and WebFlux:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QhZTaOtzUzVtve0kM4AIQg.png" /></figure><p><strong>The verdict:</strong> WebFlux offers a modest ~5% throughput advantage and notably better tail latencies (P90/P95), but at the cost of ~13% more memory and added complexity. WebFlux also reaches JIT steady state faster — only 0.7% gap between Run 2 and Run 3 vs MVC’s 6.6%.</p><p><strong>Choose WebFlux</strong> if you need the best Spring-family performance and are comfortable with the reactive programming model. <strong>Choose MVC</strong> if you prefer simplicity, lower memory, and a more familiar developer experience.</p><h3>Runtime Deep Dive</h3><h3>Spring Boot MVC: The Familiar Workhorse</h3><p><strong>Best For:</strong></p><ul><li>Traditional enterprise applications</li><li>Teams with Spring expertise</li><li>Developer-friendly, straightforward implementation</li><li>Applications requiring Spring-specific ecosystem</li></ul><p><strong>MCP Performance Profile:</strong></p><ul><li>✅ Good throughput (9,188–10,095 req/s)</li><li>✅ Mature ecosystem with extensive tooling</li><li>✅ Consistent memory footprint (556–572 MB)</li><li>✅ Excellent developer experience</li><li>⚠️ Higher latency than Quarkus (13.47–13.77ms median)</li><li>⚠️ Largest warm-up gains needed (29–44%)</li></ul><p><strong>Warm-up Effect:</strong> 29–44% performance improvement after 3 runs. The Camel+MapStruct variant showed the highest warm-up gain (+44.0%), suggesting Spring Boot MVC’s JIT compiler particularly benefits from optimizing Camel routes.</p><h3>Spring Boot WebFlux: Best Spring Performance</h3><p><strong>Best For:</strong></p><ul><li>Best Spring-family throughput needs</li><li>Reactive/non-blocking architectures</li><li>WebSocket or streaming requirements</li><li>Lower tail latency requirements</li></ul><p><strong>MCP Performance Profile:</strong></p><ul><li>✅ Best Spring throughput (9,666–10,576 req/s)</li><li>✅ Lowest Spring P90/P95 latencies</li><li>✅ Reaches JIT steady state fastest</li><li>⚠️ Higher memory (627–652 MB)</li><li>⚠️ Reactive programming complexity</li></ul><p><strong>Warm-up Effect:</strong> 20–25% performance improvement — reaches optimal state faster than MVC. Run 2→3 shows only +0.7% improvement, meaning WebFlux plateaus JIT optimization quickly.</p><h3>Quarkus JVM: The Performance Champion</h3><p><strong>Best For:</strong></p><ul><li>Maximum throughput requirements</li><li>Cloud-native applications</li><li>Kubernetes deployments</li><li>Performance-critical MCP services</li></ul><p><strong>MCP Performance Profile:</strong></p><ul><li>✅ <strong>Highest throughput across ALL configurations</strong> (13,957–16,381 req/s) ⭐</li><li>✅ <strong>Lowest latency</strong> — even with Camel (11.15ms) beats Spring Boot baseline</li><li>✅ Modern cloud-native features</li><li>✅ 55–65% faster than Spring Boot</li><li>⚠️ Higher memory than Spring Boot MVC (674–732 MB)</li><li>⚠️ Smaller ecosystem than Spring Boot</li></ul><p><strong>Warm-up Effect:</strong> 8–20% improvement — Quarkus is already well-optimized at startup and needs minimal warm-up compared to Spring Boot.</p><h3>Quarkus Native: The Memory Champion</h3><p><strong>Best For:</strong></p><ul><li>Serverless/Lambda functions</li><li>Memory-constrained environments</li><li>Edge computing, auto-scaling Kubernetes</li><li>SLA-bound environments where consistency matters</li></ul><p><strong>MCP Performance Profile:</strong></p><ul><li>✅ <strong>Exceptional memory efficiency</strong> (118–210 MB) ⭐</li><li>✅ <strong>Instant startup</strong> (milliseconds)</li><li>✅ <strong>Predictable performance</strong> — &lt; 2.5% variance across all runs</li><li>✅ No JIT warm-up required — consistent from first request</li><li>⚠️ Lower throughput than JVM (7,861–9,916 req/s)</li><li>⚠️ Higher P95 latency (57–69ms)</li><li>⚠️ Longer build times</li></ul><p><strong>Warm-up Effect:</strong> None. AOT compilation means consistent performance from the first request — &lt; 2.5% variance across all 3 runs for every configuration.</p><h3>JVM Warm-up: The Hidden Performance Factor</h3><p>One of the most underappreciated aspects of JVM performance is warm-up. Here’s how much throughput improved from Run 1 to Run 3:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7zd3nxSStARjgCJpY8tJHQ.png" /></figure><p><strong>Key Takeaway:</strong> If you’re running Spring Boot MVC with Camel routes, you’re leaving <strong>44% of your throughput on the table</strong> without proper warm-up. Always implement warm-up strategies (health-check probes, startup priming, or Kubernetes readiness gates) before serving live traffic.</p><h3>Container Resource Usage</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*j_NJ7oM1xfQ_NlBV20I96Q.png" /></figure><h3>Cloud Cost Implications</h3><h3>Memory Cost Savings with Quarkus Native</h3><p>Assuming typical cloud pricing (~$0.01/GB-hour):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PrJzMyl9jD14vrQnteEAqA.png" /></figure><p>For microservices architectures with many instances, the savings are significant. Quarkus Native’s 118–210 MB footprint means you can run <strong>5–6x more instances</strong> on the same infrastructure compared to JVM runtimes.</p><h3>Use Case Recommendations</h3><h3>🎯 Maximum Throughput</h3><p><strong>Recommended: Quarkus JVM + Baseline</strong> (16,381 req/s)</p><ul><li>Highest throughput for mission-critical AI backends</li><li>Lowest median latency: 10.0ms</li></ul><p><strong>Alternative: Quarkus JVM + MapStruct</strong> (15,429 req/s)</p><ul><li>Only 5.8% lower with proper domain model separation — the recommended production default</li></ul><h3>🏢 Enterprise Integration</h3><p><strong>Recommended: Quarkus JVM + Camel + MapStruct</strong> (13,957 req/s)</p><ul><li>Full EIP patterns, routing, error handling, dead letter channels</li><li>Still outperforms ALL Spring Boot baselines</li></ul><p><strong>Alternative: Spring Boot WebFlux + Camel + MapStruct</strong> (9,666 req/s)</p><ul><li>Mature Spring ecosystem with best Spring-family performance</li></ul><h3>💰 Cost Optimization / Serverless</h3><p><strong>Recommended: Quarkus Native + Baseline</strong> (9,916 req/s, 210 MB)</p><ul><li>Serverless, edge, or memory-constrained deployments</li><li>Instant startup, predictable performance</li></ul><p><strong>Lowest Memory: Quarkus Native + Camel + MapStruct</strong> (7,861 req/s, 118 MB)</p><ul><li>Full enterprise stack in just 118 MB</li></ul><h3>⚡ Predictable Performance / SLA-Bound</h3><p><strong>Recommended: Quarkus Native</strong> (any config, &lt; 2.5% variance)</p><ul><li>No warm-up required — instant production readiness</li><li>Consistent from the first request to the millionth</li></ul><h3>🌐 Best Spring Choice</h3><p><strong>Recommended: Spring Boot WebFlux + MapStruct</strong> (10,576 req/s)</p><ul><li>Best Spring-family throughput and lowest tail latencies</li><li>Faster JIT warm-up than MVC</li></ul><h3>🛠️ Simplest Setup</h3><p><strong>Recommended: Spring Boot MVC + MapStruct</strong> (10,095 req/s)</p><ul><li>Developer-friendly, straightforward implementation</li><li>Most familiar stack, solid performance</li></ul><h3>Conclusion</h3><h3>Key Takeaways</h3><ol><li><strong>Quarkus JVM is the throughput king.</strong> 16,381 req/s baseline, 13,957 req/s even with full Camel routing — 55–65% faster than Spring Boot across every configuration.</li><li><strong>Quarkus Native is the memory champion.</strong> 118–210 MB with instant startup and &lt; 2.5% variance. For serverless and cost-sensitive deployments, nothing comes close.</li><li><strong>MapStruct is free.</strong> Less than ±5% impact. Always use it for domain model separation — there’s no excuse not to.</li><li><strong>Camel overhead is 8–21% — and worth it.</strong> You get full enterprise integration patterns, and on Quarkus JVM, you still outperform every Spring Boot baseline.</li><li><strong>WebFlux edges out MVC</strong> by ~5% throughput and better tail latencies, but at +13% memory. Choose based on your team’s reactive programming comfort.</li><li><strong>JVM warm-up matters — a lot.</strong> Spring Boot MVC + Camel gains 44% throughput after warm-up. Always implement warm-up strategies before production traffic.</li><li><strong>MCP outperforms gRPC on Quarkus JVM</strong> (13,957 vs 11,010 req/s with Camel) — a surprising result that speaks to the efficiency of the MCP/JSON-RPC implementation.</li><li><strong>Zero failures.</strong> 100% success rate across all 36 test runs. Every configuration is production-ready.</li></ol><h3>Final Recommendations</h3><p><strong>General Purpose:</strong> Start with <strong>Quarkus JVM + MapStruct</strong> for the best balance of performance and architecture.</p><p><strong>Maximum Throughput:</strong> Use <strong>Quarkus JVM + Baseline</strong> for peak performance (16,381 req/s).</p><p><strong>Cost-Sensitive / Serverless:</strong> Use <strong>Quarkus Native</strong> for lowest memory footprint (118–210 MB) and instant startup.</p><p><strong>Enterprise Integration:</strong> Choose <strong>Quarkus JVM + Camel + MapStruct</strong> — full EIP support while still beating every Spring Boot configuration.</p><p><strong>Spring Ecosystem:</strong> Choose <strong>Spring Boot WebFlux + MapStruct</strong> for mature ecosystem with best Spring-family performance.</p><p><strong>Hybrid Approach:</strong> Mix and match — use Native for frequently scaled services, JVM for throughput-critical services.</p><h3>Reproducing These Benchmarks</h3><p>All benchmark code, test scripts, and Docker configurations are open source:</p><p>👉 <strong>GitHub:</strong> <a href="https://github.com/camelbee/camelbee-examples">https://github.com/camelbee/camelbee-examples</a></p><pre># Clone the repository<br>git clone https://github.com/camelbee/camelbee-examples.git</pre><p><em>If you found this benchmark useful, give it a 👏 and share it with your team. Got questions or want to see additional configurations? Drop a comment below!</em></p><p><em>Follow me for more Java performance deep dives and Apache Camel content.</em></p><p><em>Last Updated: February 2026</em> <em>All tests performed with interceptors disabled and optimized configurations</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4da9d6a248d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apache Camel Performance Benchmarks: gRPC vs REST with Protocol Buffers vs REST with JSON]]></title>
            <link>https://medium.com/@egekaraosmanoglu/apache-camel-performance-benchmarks-grpc-vs-rest-with-protocol-buffers-vs-rest-with-json-a66a3871762b?source=rss-a229dea17627------2</link>
            <guid isPermaLink="false">https://medium.com/p/a66a3871762b</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[grpc]]></category>
            <category><![CDATA[apache-camel]]></category>
            <category><![CDATA[microservices-testing]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Ege Karaosmanoglu]]></dc:creator>
            <pubDate>Tue, 03 Feb 2026 12:51:28 GMT</pubDate>
            <atom:updated>2026-02-03T15:06:25.632Z</atom:updated>
            <content:encoded><![CDATA[<h3>Testing on Local Docker: 2 CPUs, 1GB Memory (JVM) / 256MB Memory (Native)</h3><p><em>A comprehensive performance analysis comparing 9 different configurations of Apache Camel microservices across Spring Boot, Quarkus JVM, and Quarkus Native</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TigXWARxJlCdfiMUzUa-hw.png" /></figure><h3>TL;DR</h3><p>We benchmarked <strong>9 different microservice configurations</strong> using Apache Camel (Spring Boot, Quarkus JVM, Quarkus Native) across three protocols (gRPC, REST+Protobuf, REST+JSON). Here are the key findings:</p><ul><li><strong>Highest Throughput</strong>: Quarkus JVM with gRPC — <strong>11,010 req/s</strong></li><li><strong>Lowest Memory</strong>: Quarkus Native with REST+Protobuf — <strong>77 MB</strong></li><li><strong>Best Latency</strong>: Quarkus JVM with REST+Protobuf — <strong>10.23ms median</strong></li><li><strong>Payload Efficiency</strong>: Protocol Buffers are <strong>60–70% smaller</strong> than JSON</li></ul><p>All benchmark code, test scripts, configurations, and detailed results are available as open source on GitHub: 👉 <a href="https://github.com/camelbee/camelbee-examples/tree/main/performance-benchmarks"><strong>https://github.com/camelbee/camelbee-examples</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/419/1*txVdd3dOBv7_5o5jp9szUw.png" /></figure><h3>Introduction</h3><p>When building microservices with Apache Camel, choosing the right runtime and protocol can dramatically impact performance, cost, and scalability. With multiple runtime options (Spring Boot, Quarkus JVM, Quarkus Native) and protocol choices (gRPC, REST with Protocol Buffers, REST with JSON), how do you decide which configuration is best for your use case?</p><p>To answer this question, I conducted comprehensive performance benchmarks across:</p><ul><li><strong>3 Runtimes</strong>: Spring Boot, Quarkus JVM, Quarkus Native</li><li><strong>3 Protocols</strong>: gRPC, REST with Protocol Buffers, REST with JSON</li><li><strong>9 Total Configurations</strong>: Every combination tested on local Docker</li></ul><p>This article shares the findings with real Apache Camel implementation examples and detailed performance metrics.</p><h3>Test Setup</h3><h3>Environment</h3><ul><li><strong>Apache Camel 4.16</strong></li><li><strong>Quarkus 3.30.0</strong></li><li><strong>Spring Boot 3.5.9</strong></li><li><strong>Java 21</strong></li><li><strong>Platform</strong>: Local Docker containers</li><li><strong>CPU</strong>: 2 cores allocated per container</li><li><strong>Memory</strong>: 1GB (JVM runtimes) / 256MB (Native runtime)</li><li><strong>Container</strong>: Docker with resource limits</li><li><strong>Load Test Tool</strong>: k6</li><li><strong>Virtual Users</strong>: 200 concurrent</li><li><strong>Duration</strong>: 2 minutes per test</li><li><strong>Warm-up</strong>: 3 runs for JVM optimization</li><li><strong>Hardware:</strong> MacBook Pro M1</li></ul><h3>Request Type &amp; Data Transformation</h3><p><strong>Important Context:</strong> These benchmarks test <strong>POST requests</strong> (create order operations) with realistic data transformation pipelines:</p><ol><li><strong>Incoming Request</strong> → Unmarshal (JSON/Protobuf/gRPC)</li><li><strong>API to Domain Mapping</strong> → MapStruct conversion (API model → Domain model)</li><li><strong>Business Logic</strong> → Process order in domain layer (mock backend)</li><li><strong>Domain to API Mapping</strong> → MapStruct conversion (Domain model → API model)</li><li><strong>Outgoing Response</strong> → Marshal (JSON/Protobuf/gRPC)</li></ol><p>This means <strong>two MapStruct mapping operations per request</strong>, simulating real-world scenarios where you maintain separation between API contracts and domain models.</p><blockquote><strong><em>Note</em></strong><em>: Simple GET requests without object mappings would show higher throughput. These results reflect production-grade implementations with proper architectural layering and data transformation overhead.</em></blockquote><h3>Configuration</h3><p>All tests were performed with:</p><ul><li>Apache Camel interceptors disabled for maximum performance</li><li>Mock backend (no external dependencies)</li><li>Optimized Docker resource allocation</li><li>Production-like settings</li></ul><h3>The Implementations</h3><p>Let’s look at how Apache Camel handles these different protocols. The beauty of Apache Camel is the consistent, clean routing patterns across all implementations.</p><h3>gRPC Implementation</h3><p>Both Quarkus and Spring Boot use nearly identical Apache Camel routes for gRPC:</p><pre>@ApplicationScoped // Quarkus<br>// @Component // Spring Boot<br>@RequiredArgsConstructor<br>@Slf4j<br>public class GrpcConsumerRoute extends RouteBuilder {<br><br>  final RouteConfigurer routeConfigurer;<br>  final GenericExceptionHandler genericExceptionHandler;<br>  final GrpcOrderMapper grpcOrderMapper; // MapStruct mapper<br><br>  @Override<br>  public void configure() throws Exception {<br><br>    routeConfigurer.configureRoute(this);<br><br>    from(&quot;grpc://0.0.0.0:{{grpc-server.port}}/com.mycompany.order.grpc.OrderService&quot;)<br>        .id(&quot;grpcOrderServiceRoute&quot;)<br>        .doTry()<br>        .to(&quot;direct:grpcMain&quot;)<br>        .doCatch(Exception.class)<br>        .to(&quot;direct:error&quot;)<br>        .end();<br><br>    from(&quot;direct:grpcMain&quot;)<br>        .choice()<br>        // CREATE ORDER<br>        .when(header(GrpcConstants.GRPC_METHOD_NAME_HEADER).isEqualTo(&quot;createOrder&quot;))<br>        .process(e -&gt; {<br>          CreateOrderRequest request = e.getIn().getBody(CreateOrderRequest.class);<br>          e.getIn().setHeader(&quot;transactionId&quot;, request.getTransactionId());<br>          // Mapping #1: API (Proto) → Domain using MapStruct<br>          e.getIn().setBody(grpcOrderMapper.protoToDomainOrder(request.getOrder()));<br>        })<br>        .to(&quot;direct:centralCreateOrder&quot;) // Business logic with domain model<br>        .process(e -&gt; {<br>          // Mapping #2: Domain → API (Proto) using MapStruct<br>          CreateOrderResponse response = CreateOrderResponse.newBuilder()<br>              .setOrder(grpcOrderMapper.domainToProtoOrder(e.getIn().getBody(Order.class)))<br>              .build();<br>          e.getIn().setBody(response);<br>        })<br>        .otherwise()<br>        .throwException(new RuntimeException());<br>  }<br>}</pre><p><strong>Key Points:</strong></p><ul><li>Uses Apache Camel’s gRPC component</li><li>Binary Protocol Buffers serialization</li><li><strong>MapStruct for bidirectional mapping</strong> (Proto ↔ Domain)</li><li>Automatic request/response mapping</li><li>Built-in error handling</li></ul><h3>REST with Protocol Buffers Implementation</h3><pre>@ApplicationScoped // Quarkus<br>// @Component // Spring Boot<br>@RequiredArgsConstructor<br>@Slf4j<br>public class RestConsumerRoute extends RouteBuilder {<br><br>  final RouteConfigurer routeConfigurer;<br>  final GenericExceptionHandler genericExceptionHandler;<br>  final ProtoOrderMapper protoOrderMapper; // MapStruct mapper<br><br>  @Override<br>  public void configure() throws Exception {<br><br>    routeConfigurer.configureRoute(this);<br>    errorHandler(genericExceptionHandler.appErrorHandler());<br><br>    // Critical: Use streaming for binary data<br>    PlatformHttpEndpoint endpoint = getContext()<br>        .getEndpoint(&quot;platform-http:///service?matchOnUriPrefix=true&quot;, <br>                     PlatformHttpEndpoint.class);<br>    endpoint.setUseStreaming(true);<br><br>    restConfiguration().bindingMode(RestBindingMode.off);<br>    rest().openApi().specification(&quot;openapi/order-api.yaml&quot;).missingOperation(&quot;ignore&quot;);<br><br>    from(&quot;direct:createOrder&quot;)<br>        .routeId(&quot;createOrderOperationRoute&quot;)<br>        .process(this::setOriginalContentTypeProperties)<br>        .convertBodyTo(byte[].class)<br>        .unmarshal().protobuf(Order.getDefaultInstance()) // Unmarshal Protobuf<br>        .convertBodyTo(com.mycompany.model.domain.Order.class) // Mapping #1: API → Domain (MapStruct)<br>        .to(&quot;direct:centralCreateOrder&quot;) // Business logic with domain model<br>        .convertBodyTo(com.mycompany.model.api.proto.Order.class) // Mapping #2: Domain → API (MapStruct)<br>        .marshal().protobuf() // Marshal Protobuf<br>        .process(this::setOriginalContentTypePropertiesBack)<br>        .setHeader(HTTP_RESPONSE_CODE, constant(201));<br>  }<br>}</pre><p><strong>Key Points:</strong></p><ul><li>HTTP/1.1 with binary Protocol Buffers</li><li>setUseStreaming(true) crucial for binary data</li><li><strong>MapStruct for bidirectional mapping</strong> (API Proto ↔ Domain)</li><li>Marshal/unmarshal with Protobuf</li><li>OpenAPI specification support</li></ul><h3>REST with JSON Implementation</h3><p><strong>Quarkus Version:</strong></p><pre>@ApplicationScoped<br>@RequiredArgsConstructor<br>@Slf4j<br>public class RestConsumerRoute extends RouteBuilder {<br><br>  final RouteConfigurer routeConfigurer;<br>  final GenericExceptionHandler genericExceptionHandler;<br>  final JsonOrderMapper jsonOrderMapper; // MapStruct mapper<br>  final ObjectMapper objectMapper;<br><br>  @Override<br>  public void configure() throws Exception {<br><br>    routeConfigurer.configureRoute(this);<br>    errorHandler(genericExceptionHandler.appErrorHandler());<br><br>    JacksonDataFormat dataFormat = new JacksonDataFormat();<br>    dataFormat.setObjectMapper(objectMapper);<br>    final JacksonDataFormat orderFormat = new JacksonDataFormat(objectMapper, Order.class);<br><br>    restConfiguration().bindingMode(RestBindingMode.off);<br>    rest().openApi().specification(&quot;openapi/order-api.yaml&quot;).missingOperation(&quot;ignore&quot;);<br><br>    from(&quot;direct:createOrder&quot;)<br>        .routeId(&quot;createOrderOperationRoute&quot;)<br>        .process(this::setOriginalContentTypeProperties)<br>        .unmarshal(orderFormat) // Unmarshal JSON<br>        .to(&quot;bean-validator://validation&quot;) // Bean validation<br>        .convertBodyTo(com.mycompany.model.domain.Order.class) // Mapping #1: API → Domain (MapStruct)<br>        .to(&quot;direct:centralCreateOrder&quot;) // Business logic with domain model<br>        .convertBodyTo(Order.class) // Mapping #2: Domain → API (MapStruct)<br>        .marshal(dataFormat) // Marshal JSON<br>        .process(this::setOriginalContentTypePropertiesBack)<br>        .setHeader(HTTP_RESPONSE_CODE, constant(201));<br>  }<br>}</pre><p><strong>Spring Boot Version:</strong></p><pre>@Component<br>@RequiredArgsConstructor<br>@Slf4j<br>public class RestConsumerRoute extends RouteBuilder {<br><br>  final RouteConfigurer routeConfigurer;<br>  final GenericExceptionHandler genericExceptionHandler;<br>  final JsonOrderMapper jsonOrderMapper; // MapStruct mapper<br><br>  @Override<br>  public void configure() throws Exception {<br><br>    routeConfigurer.configureRoute(this);<br>    errorHandler(genericExceptionHandler.appErrorHandler());<br><br>    restConfiguration().bindingMode(RestBindingMode.off);<br>    rest().openApi().specification(&quot;openapi/order-api.yaml&quot;).missingOperation(&quot;ignore&quot;);<br><br>    from(&quot;direct:createOrder&quot;)<br>        .routeId(&quot;createOrderOperationRoute&quot;)<br>        .process(this::setOriginalContentTypeProperties)<br>        .unmarshal().json(JsonLibrary.Jackson, Order.class) // Unmarshal JSON<br>        .to(&quot;bean-validator://validation&quot;) // Bean validation<br>        .convertBodyTo(com.mycompany.model.domain.Order.class) // Mapping #1: API → Domain (MapStruct)<br>        .to(&quot;direct:centralCreateOrder&quot;) // Business logic with domain model<br>        .convertBodyTo(Order.class) // Mapping #2: Domain → API (MapStruct)<br>        .marshal().json() // Marshal JSON<br>        .process(this::setOriginalContentTypePropertiesBack)<br>        .setHeader(HTTP_RESPONSE_CODE, constant(201));<br>  }<br>}</pre><p><strong>Key Points:</strong></p><ul><li>Human-readable JSON format</li><li><strong>MapStruct for bidirectional mapping</strong> (API JSON ↔ Domain)</li><li>Bean validation support</li><li>Framework-specific JSON handling (Jackson)</li><li>OpenAPI specification support</li></ul><h3>Performance Results</h3><h3>Overall Throughput Comparison (Requests/Second)</h3><p><strong>Spring Boot:</strong></p><ul><li>gRPC: 10,208 req/s</li><li>REST + Protobuf: 8,620 req/s</li><li>REST + JSON: 7,188 req/s</li><li>Average: 8,672 req/s</li></ul><p><strong>Quarkus JVM:</strong></p><ul><li>gRPC: 11,010 req/s ⭐ <strong>(Winner)</strong></li><li>REST + Protobuf: 10,502 req/s</li><li>REST + JSON: 8,461 req/s</li><li>Average: 9,991 req/s</li></ul><p><strong>Quarkus Native:</strong></p><ul><li>gRPC: 6,245 req/s</li><li>REST + Protobuf: 6,461 req/s</li><li>REST + JSON: 5,260 req/s</li><li>Average: 5,989 req/s</li></ul><p><strong>Key Insights:</strong></p><ul><li>Quarkus JVM leads in throughput across all protocols</li><li>gRPC consistently outperforms REST protocols by 15–30%</li><li>Native compilation reduces throughput by ~40–45% compared to JVM</li></ul><h3>Memory Usage Comparison (MB)</h3><p><strong>Spring Boot:</strong></p><ul><li>gRPC: 757 MB</li><li>REST + Protobuf: 535 MB</li><li>REST + JSON: 629 MB</li><li>Average: 640 MB</li></ul><p><strong>Quarkus JVM:</strong></p><ul><li>gRPC: 633 MB</li><li>REST + Protobuf: 631 MB</li><li>REST + JSON: 703 MB</li><li>Average: 656 MB</li></ul><p><strong>Quarkus Native:</strong></p><ul><li>gRPC: 100 MB</li><li>REST + Protobuf: 77 MB ⭐ <strong>(Winner)</strong></li><li>REST + JSON: 87 MB</li><li>Average: 88 MB</li></ul><p><strong>Key Insights:</strong></p><ul><li>Quarkus Native uses 85–90% less memory than JVM-based runtimes</li><li>Spring Boot and Quarkus JVM have similar memory footprints</li><li>JSON processing requires slightly more memory than Protocol Buffers</li></ul><h3>Latency Comparison — Median (ms)</h3><p><strong>Spring Boot:</strong></p><ul><li>gRPC: 14.57 ms</li><li>REST + Protobuf: 10.93 ms</li><li>REST + JSON: 12.55 ms</li></ul><p><strong>Quarkus JVM:</strong></p><ul><li>gRPC: 14.47 ms</li><li>REST + Protobuf: 10.23 ms ⭐ <strong>(Winner)</strong></li><li>REST + JSON: 12.06 ms</li></ul><p><strong>Quarkus Native:</strong></p><ul><li>gRPC: 17.4 ms</li><li>REST + Protobuf: 16.07 ms</li><li>REST + JSON: 19.02 ms</li></ul><p><strong>Key Insights:</strong></p><ul><li>Quarkus JVM provides the lowest latency across most scenarios</li><li>REST + Protobuf achieves lower median latency than gRPC</li><li>Native runtimes have 50–75% higher average latency than JVM</li></ul><h3>The Protocol Buffers Advantage</h3><p>One of the most significant findings was the <strong>dramatic payload size difference</strong> between Protocol Buffers and JSON:</p><h3>Payload Size Comparison</h3><p><strong>Protocol Buffers:</strong></p><ul><li>Average: ~885 bytes per request</li><li>Data transfer: Baseline</li></ul><p><strong>JSON:</strong></p><ul><li>Average: ~2,852 bytes per request</li><li>Data transfer: <strong>+222% larger than Protobuf</strong></li></ul><p><strong>Protocol Buffers are 60–70% smaller than JSON!</strong></p><h3>Network Cost Impact</h3><p>For a service handling <strong>10 million requests per day</strong>:</p><p><strong>Protocol Buffers:</strong></p><ul><li>Daily Transfer: 8.5 GB</li><li>Monthly Transfer: 255 GB</li><li>Estimated Monthly Cost*: $25.50</li><li>Annual Cost*: $306</li></ul><p><strong>JSON:</strong></p><ul><li>Daily Transfer: 28.5 GB</li><li>Monthly Transfer: 855 GB</li><li>Estimated Monthly Cost*: $85.50</li><li>Annual Cost*: $1,026</li></ul><p><strong>Savings with Protobuf:</strong></p><ul><li>20 GB/day less</li><li>600 GB/month less</li><li><strong>$60/month savings</strong></li><li><strong>$720/year savings</strong></li></ul><p>*Based on typical cloud egress pricing of $0.10/GB</p><h3>Real-World Example: 100M Requests/Day</h3><p><strong>Protocol Buffers:</strong></p><ul><li>Monthly Transfer: 2.55 TB</li><li>Estimated Monthly Cost: $255</li><li>Annual Cost: $3,060</li></ul><p><strong>JSON:</strong></p><ul><li>Monthly Transfer: 8.55 TB</li><li>Estimated Monthly Cost: $855</li><li>Annual Cost: $10,260</li></ul><p><strong>Savings with Protobuf:</strong></p><ul><li>6 TB/month less</li><li><strong>$600/month savings</strong></li><li><strong>$7,200/year savings</strong></li></ul><h3>Runtime Deep Dive</h3><h3>Spring Boot: Enterprise Ready</h3><p><strong>Best For:</strong></p><ul><li>Traditional enterprise applications</li><li>Teams with Spring expertise</li><li>Long-running services</li><li>Extensive ecosystem needs</li></ul><p><strong>Performance Profile:</strong></p><ul><li>✅ Good throughput (7,188–10,208 req/s)</li><li>✅ Mature ecosystem</li><li>✅ Excellent developer experience</li><li>⚠️ Higher memory usage (535–757 MB)</li><li>⚠️ Longer startup time</li></ul><p><strong>Warm-up Effect:</strong> 25–40% performance improvement after 2–3 runs</p><h3>Quarkus JVM: Performance Champion</h3><p><strong>Best For:</strong></p><ul><li>Maximum throughput requirements</li><li>Cloud-native applications</li><li>Kubernetes deployments</li><li>Performance-critical services</li></ul><p><strong>Performance Profile:</strong></p><ul><li>✅ <strong>Highest throughput</strong> (8,461–11,010 req/s) ⭐</li><li>✅ <strong>Lowest latency</strong> (10.23–17.96ms avg)</li><li>✅ Lower memory than Spring Boot (631–703 MB)</li><li>✅ Fast startup</li><li>⚠️ Requires warm-up for peak performance</li></ul><p><strong>Warm-up Effect:</strong> 8–27% performance improvement after 2–3 runs</p><h3>Quarkus Native: Efficiency King</h3><p><strong>Best For:</strong></p><ul><li>Serverless/Lambda functions</li><li>Memory-constrained environments</li><li>Cost-sensitive deployments</li><li>Microservices at scale</li></ul><p><strong>Performance Profile:</strong></p><ul><li>✅ <strong>Exceptional memory efficiency</strong> (77–100 MB) ⭐</li><li>✅ <strong>Instant startup</strong> (milliseconds)</li><li>✅ Predictable performance</li><li>✅ 85–90% memory savings vs JVM</li><li>⚠️ 40–45% lower throughput than JVM</li><li>⚠️ Higher average latency (30–38ms)</li></ul><p><strong>Warm-up Effect:</strong> Minimal — performs consistently from start</p><h3>When to Choose What</h3><h3>Maximum Throughput</h3><p><strong>Choose: Quarkus JVM with gRPC</strong></p><ul><li>Throughput: 11,010 req/s</li><li>Latency: 17.96ms avg</li><li>Memory: 633 MB</li><li>Use Case: High-traffic APIs, real-time processing</li></ul><h3>Cost Optimization</h3><p><strong>Choose: Quarkus Native with REST + Protobuf</strong></p><ul><li>Memory: 77 MB (lowest!)</li><li>Throughput: 6,461 req/s</li><li>Network: 3.20 GB total (most efficient!)</li><li>Use Case: Serverless, multi-tenant, high-density</li></ul><h3>Low Latency</h3><p><strong>Choose: Quarkus JVM with REST + Protobuf</strong></p><ul><li>Median Latency: 10.23ms (lowest!)</li><li>Throughput: 10,502 req/s</li><li>P95 Latency: 62.01ms</li><li>Use Case: Real-time apps, trading systems</li></ul><h3>High-Volume / Bandwidth-Sensitive</h3><p><strong>Choose: Any Runtime with Protocol Buffers</strong></p><ul><li>Payload: 60–70% smaller than JSON</li><li>Network Savings: 40–44% less I/O</li><li>Cost Impact: $60–600/month savings</li><li>Use Case: Mobile apps, CDN, international traffic</li></ul><h3>Enterprise / Traditional</h3><p><strong>Choose: Spring Boot with REST + JSON</strong></p><ul><li>Mature ecosystem</li><li>Universal compatibility</li><li>Large developer pool</li><li>Use Case: Internal services, legacy integration</li></ul><h3>Serverless / FaaS</h3><p><strong>Choose: Quarkus Native (any protocol)</strong></p><ul><li>Startup: Milliseconds</li><li>Memory: 77–100 MB</li><li>Cost: Minimal per-invocation</li><li>Use Case: AWS Lambda, Azure Functions</li></ul><h3>Key Takeaways</h3><h3>1. Runtime Matters</h3><p>Quarkus JVM delivered the best throughput (11,010 req/s), while Quarkus Native achieved 85–90% memory savings (77 MB) — perfect for different use cases.</p><h3>2. Protocol Buffers Are a Game-Changer</h3><p>With 60–70% smaller payloads, Protocol Buffers can save thousands of dollars annually in bandwidth costs while improving performance.</p><h3>3. Real-World Performance</h3><p>These benchmarks include realistic overhead: POST requests with two MapStruct mapping operations (API ↔ Domain), bean validation, and proper architectural layering. Simple GET requests would show higher numbers, but these results reflect production-grade implementations.</p><h3>4. gRPC vs REST+Protobuf</h3><ul><li><strong>gRPC</strong>: +5–15% higher throughput, built-in streaming</li><li><strong>REST+Protobuf</strong>: Better HTTP compatibility, lower median latency</li><li>Both use Protocol Buffers serialization</li></ul><h3>5. Native Compilation Trade-offs</h3><p>Quarkus Native offers exceptional memory efficiency (87% reduction) but at 40–45% throughput cost. Choose based on your constraints.</p><h3>6. Warm-up Is Critical for JVM</h3><p>JVM-based runtimes (Spring Boot, Quarkus JVM) require 2–3 warm-up runs to achieve peak performance — factor this into production deployments.</p><h3>7. Apache Camel Consistency</h3><p>The same Apache Camel code patterns work across all runtimes and protocols — you can easily switch configurations without major code changes.</p><h3>Implementation Best Practices</h3><p>Based on the benchmarking experience, here are key recommendations:</p><h3>1. For Binary Protocols (gRPC, REST+Protobuf)</h3><pre>// CRITICAL for Protobuf over REST<br>PlatformHttpEndpoint endpoint = getContext()<br>    .getEndpoint(&quot;platform-http:///service?matchOnUriPrefix=true&quot;, <br>                 PlatformHttpEndpoint.class);<br>endpoint.setUseStreaming(true); // Prevents encoding issues</pre><h3>2. Disable Unnecessary Interceptors for Production</h3><pre># Example configuration for optimal performance<br>monitoring:<br>  enabled: false<br>tracing:<br>  enabled: false<br>logging:<br>  detailed: false</pre><p>This can improve performance by 10–20%.</p><h3>3. Optimize Docker Resources</h3><pre>deploy:<br>  resources:<br>    limits:<br>      cpus: &#39;2&#39;              # 2 cores optimal for these tests<br>      memory: 1G             # JVM-based runtimes<br>      # Native: 256MB sufficient<br>    reservations:<br>      cpus: &#39;1&#39;<br>      memory: 1G             # JVM<br>      # Native: 128MB</pre><h3>4. Always Perform Warm-up</h3><p>For JVM-based runtimes, performance improves 25–40% after 2–3 runs. In production:</p><ul><li>Use readiness probes with delays</li><li>Implement pre-warming strategies</li><li>Monitor first-request latency</li></ul><h3>Conclusion</h3><p>Choosing the right runtime and protocol for your Apache Camel microservices can have dramatic impacts:</p><ul><li><strong>Throughput</strong>: Up to 76% difference (11,010 vs 6,245 req/s)</li><li><strong>Memory</strong>: Up to 90% difference (757 MB vs 77 MB)</li><li><strong>Network Costs</strong>: Up to $7,200/year savings with Protocol Buffers</li><li><strong>Latency</strong>: Up to 47% difference (10.23ms vs 19.02ms)</li></ul><p>The “best” choice depends on your specific requirements:</p><ul><li><strong>Need maximum throughput?</strong> → Quarkus JVM + gRPC</li><li><strong>Memory constrained?</strong> → Quarkus Native + REST+Protobuf</li><li><strong>High volume traffic?</strong> → Protocol Buffers (any runtime)</li><li><strong>Enterprise environment?</strong> → Spring Boot + REST+JSON</li></ul><p>These benchmarks demonstrate that Apache Camel provides flexible, high-performance solutions across different runtimes and protocols. With consistent routing patterns, you can easily test and switch between configurations to find what works best for your specific use case.</p><h3>Resources</h3><p>All benchmark code, test scripts, configurations, and detailed results are available as open source on GitHub: 👉 <a href="https://github.com/camelbee/camelbee-examples"><strong>https://github.com/camelbee/camelbee-examples</strong></a></p><p>The repository includes:</p><ul><li>Complete Apache Camel microservice implementations</li><li>k6 load test scripts</li><li>Docker configurations</li><li>Detailed performance test results</li><li>Step-by-step reproduction guide</li></ul><p>Feel free to clone the repository and run these benchmarks in your own environment!</p><h3>About the Author</h3><p>I’m Ege, a software developer specializing in enterprise integration and Apache Camel microservices. I’m passionate about performance optimization and sharing practical knowledge on building efficient integration solutions.</p><p>Connect with me on LinkedIn to discuss Apache Camel, microservices, and performance engineering:<br> <a href="https://www.linkedin.com/in/egekaraosmanoglu/">https://www.linkedin.com/in/egekaraosmanoglu/</a></p><p><em>Have questions about these benchmarks or Apache Camel performance? Drop a comment below!</em></p><h3>Tags</h3><p>#ApacheCamel #Microservices #gRPC #ProtocolBuffers #Quarkus #SpringBoot #PerformanceTesting #CloudNative #Java #Kubernetes #Serverless #Docker</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a66a3871762b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>