<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Kafka on Samarthya</title><link>https://samarthya.me/tags/kafka/</link><description>Recent content in Kafka on Samarthya</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© Samarthya 2018-2026. All rights reserved.</copyright><lastBuildDate>Sun, 07 Dec 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://samarthya.me/tags/kafka/index.xml" rel="self" type="application/rss+xml"/><item><title>Reading Kafka JMX Data Without Getting Lost in the Numbers</title><link>https://samarthya.me/posts/kafka-jmx-reading-metrics/</link><pubDate>Sun, 07 Dec 2025 00:00:00 +0000</pubDate><guid>https://samarthya.me/posts/kafka-jmx-reading-metrics/</guid><description>&lt;p&gt;The first JMX screen I opened contained more metrics than I knew what to do with. Every number looked important. After a while I started grouping them by the question I was trying to answer instead of building a dashboard from every available bean.&lt;/p&gt;</description></item><item><title>Kafka JMX: What to Enable and What It Actually Measures</title><link>https://samarthya.me/posts/kafka-jmx-monitoring/</link><pubDate>Sat, 11 Oct 2025 00:00:00 +0000</pubDate><guid>https://samarthya.me/posts/kafka-jmx-monitoring/</guid><description>&lt;p&gt;Kafka was running, producers were sending messages, and yet I still felt I was operating it by looking at the console and guessing. I wanted numbers that could tell me whether the broker was busy, whether consumers were falling behind, and whether replication was healthy.&lt;/p&gt;</description></item><item><title>Securing Kafka Brokers: A Practical Operations Checklist</title><link>https://samarthya.me/posts/securing-kafka-brokers/</link><pubDate>Sat, 14 Jun 2025 00:00:00 +0000</pubDate><guid>https://samarthya.me/posts/securing-kafka-brokers/</guid><description>&lt;p&gt;I used to think of Kafka security as a client configuration problem. Then I started thinking about the broker host itself: which user owns the process, who can read the configuration, what is exposed on the network, and what happens during an incident.&lt;/p&gt;</description></item><item><title>Securing Kafka: Start with Identity, Transport, and Authorization</title><link>https://samarthya.me/posts/securing-kafka-basics/</link><pubDate>Sat, 22 Mar 2025 00:00:00 +0000</pubDate><guid>https://samarthya.me/posts/securing-kafka-basics/</guid><description>&lt;p&gt;When I started looking at Kafka security, I found myself jumping straight to configuration properties. That was backwards. I found it easier to ask three questions first:&lt;/p&gt;&#10;&#10; &#10;&#10;&#10;&#10;&lt;div&#10; &#10; class="flex px-4 py-3 rounded-md shadow bg-primary-100 dark:bg-primary-900"&#10; &#10; &gt;&#10; &lt;span&#10; &#10; class="text-primary-400 pe-3 flex items-center"&#10; &#10; &gt;&#10; &lt;span class="relative block icon"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"&gt;&lt;path fill="currentColor" d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 128c17.67 0 32 14.33 32 32c0 17.67-14.33 32-32 32S224 177.7 224 160C224 142.3 238.3 128 256 128zM296 384h-80C202.8 384 192 373.3 192 360s10.75-24 24-24h16v-64H224c-13.25 0-24-10.75-24-24S210.8 224 224 224h32c13.25 0 24 10.75 24 24v88h16c13.25 0 24 10.75 24 24S309.3 384 296 384z"/&gt;&lt;/svg&gt;&#10;&lt;/span&gt;&#10; &lt;/span&gt;&#10;&#10; &lt;span&#10; &#10; class="dark:text-neutral-300"&#10; &#10; &gt;Written up in October 2026 from my notes at the time. The configuration snippets and verification output are illustrative and contain no real credentials.&lt;/span&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="low"&#10; alt="Encryption, authentication, and authorization are separate Kafka security layers"&#10; src="https://samarthya.me/posts/securing-kafka-basics/kafka-security-layers.svg"&#10; &gt;&lt;/figure&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Can the client prove who it is?&lt;/li&gt;&#10;&lt;li&gt;Can the client communicate privately with the broker?&lt;/li&gt;&#10;&lt;li&gt;Is that identity allowed to perform this operation?&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;These are authentication, encryption, and authorization. Configuring one does not automatically provide the others.&lt;/p&gt;</description></item><item><title>Kafka Cluster Fundamentals: Brokers, Topics, and Partitions</title><link>https://samarthya.me/posts/kafka-cluster-fundamentals/</link><pubDate>Sat, 18 Jan 2025 00:00:00 +0000</pubDate><guid>https://samarthya.me/posts/kafka-cluster-fundamentals/</guid><description>&lt;p&gt;I spent a fair amount of time looking at Kafka command output before the vocabulary settled in my head. Once I understood the difference between a broker, a topic, and a partition, the cluster stopped looking like one large mysterious system.&lt;/p&gt;</description></item><item><title>ZooKeeper Explained: Coordination Behind a Kafka Cluster</title><link>https://samarthya.me/posts/zookeeper-coordination-explained/</link><pubDate>Sat, 23 Nov 2024 00:00:00 +0000</pubDate><guid>https://samarthya.me/posts/zookeeper-coordination-explained/</guid><description>&lt;p&gt;When I first came across ZooKeeper in a Kafka deployment, I treated it as another dependency that had to be started before Kafka. That explanation was not good enough. I wanted to know what it was actually doing when a broker disappeared or a controller changed.&lt;/p&gt;</description></item><item><title>Kafka Streams</title><link>https://samarthya.me/posts/kafka-streams/</link><pubDate>Mon, 26 Feb 2024 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/kafka-streams/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt=""&#10; width="600"&#10; height="600"&#10; src="https://samarthya.me/posts/kafka-streams/stream-1.jpg"&#10; srcset="https://samarthya.me/posts/kafka-streams/stream-1.jpg 800w, https://samarthya.me/posts/kafka-streams/stream-1.jpg 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/kafka-streams/stream-1.jpg"&gt;&lt;/figure&gt;&#10;&lt;p&gt;In today’s data-driven world, the ability to process information in real-time is crucial. &lt;strong&gt;Kafka Streams&lt;/strong&gt; emerges as a powerful tool for building &lt;strong&gt;real-time applications and microservices&lt;/strong&gt; that leverage the &lt;strong&gt;Apache Kafka&lt;/strong&gt; distributed streaming platform.&lt;/p&gt;</description></item><item><title>Trust Store: Apache Kafka</title><link>https://samarthya.me/posts/trust-store-apache-kafka/</link><pubDate>Wed, 22 Feb 2023 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/trust-store-apache-kafka/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt="Keystore compared with truststore: what each holds, what it answers, who uses it and how it is protected"&#10; width="1200"&#10; height="630"&#10; src="https://samarthya.me/posts/trust-store-apache-kafka/ks-store_hu_11039215fe5c1ec1.png"&#10; srcset="https://samarthya.me/posts/trust-store-apache-kafka/ks-store_hu_11039215fe5c1ec1.png 800w, https://samarthya.me/posts/trust-store-apache-kafka/ks-store.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/trust-store-apache-kafka/ks-store.png"&gt;&lt;figcaption&gt;Recreated in October 2026 from the post; the original image was lost&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;In &lt;code&gt;Apache Kafka&lt;/code&gt;, &lt;code&gt;trust store&lt;/code&gt; and &lt;code&gt;keystore&lt;/code&gt; are essential components for ensuring secure communication between brokers, clients, and other services. In this blog post, we will discuss the concept of trust store and keystore in detail, their importance, and why we use them in Apache Kafka.&lt;/p&gt;</description></item><item><title>Zookeeper mTLS</title><link>https://samarthya.me/posts/zookeeper-mtls/</link><pubDate>Fri, 07 Oct 2022 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/zookeeper-mtls/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; A bad way to spend one’s Friday, but at least I am ending it on a good note.&#10;— ~ Friday guru&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;I was struggling with the mTLS configuration for zookeeper configuration and somehow no matter what I do I kept getting an error as below&lt;/p&gt;</description></item><item><title>Naming Convention Policy for Kafka topics</title><link>https://samarthya.me/posts/naming-convention-policy-for-kafka-topics/</link><pubDate>Wed, 13 Jul 2022 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/naming-convention-policy-for-kafka-topics/</guid><description>&lt;p&gt;Creating a &lt;strong&gt;Topic&lt;/strong&gt; in a kafka-cluster is easy and well documented for the &lt;code&gt;kafka-topics.sh&lt;/code&gt; or even the official API documentation.&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; bin/kafka-topics.sh --help&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;The complexity arises, when you are trying to enforce a standard way of defining topic naming. There are many ways to identify the &lt;strong&gt;right convention&lt;/strong&gt; based on your need, but to enforce such a topic convention while you are creating one is explained in this 5 steps blog.&lt;/p&gt;</description></item><item><title>JMX: Monitoring and Managing Kafka</title><link>https://samarthya.me/posts/jmx-monitoring-and-managing-kafka/</link><pubDate>Fri, 22 Apr 2022 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/jmx-monitoring-and-managing-kafka/</guid><description>&lt;blockquote&gt;&lt;p&gt;💬 The Java virtual machine (Java VM) has built-in instrumentation that enables you to monitor and manage it using the Java Management Extensions (JMX) technology.&lt;/p&gt;&#10;&lt;/blockquote&gt;&lt;p&gt;To enable and configure monitoring of Java VM for any java-application using the ready-to-use JMX agent, you must set certain system properties when you start the Java VM.&lt;/p&gt;</description></item><item><title>Kafka: Deploy &amp; Test</title><link>https://samarthya.me/posts/kafka-deploy-test/</link><pubDate>Fri, 11 Feb 2022 08:17:19 +0000</pubDate><guid>https://samarthya.me/posts/kafka-deploy-test/</guid><description>&lt;p&gt;While I continue to learn more about architecture and design of &lt;code&gt;kafka&lt;/code&gt;, a quickstart to deploy &amp;amp; test kafka is a must.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Step 1: Add Chart Repo&#10; &lt;div id="step-1-add-chart-repo" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#step-1-add-chart-repo" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;In my local system it is already present which was confirmed by the listing&lt;/p&gt;</description></item><item><title>Event Streaming</title><link>https://samarthya.me/posts/event-streaming/</link><pubDate>Thu, 20 Jan 2022 08:06:56 +0000</pubDate><guid>https://samarthya.me/posts/event-streaming/</guid><description>&lt;p&gt;While reading Apache &lt;code&gt;Kafka&lt;/code&gt; it was interesting analogy that they described&lt;/p&gt;&#10;&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; Event streaming is the digital equivalent of the human body&amp;rsquo;s central nervous system.&#10;— Apache Kafka&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;It draws a great parallel between how the central nervous system allows for real time event generations and consumption in terms of reflex actions. The examples are well explained and captured &lt;a href="https://kafka.apache.org/powered-by" target="_blank" rel="noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>