<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: jay</title>
    <description>The latest articles on DEV Community by jay (@jaymku).</description>
    <link>https://dev.to/jaymku</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3308121%2F378f4575-6c43-4baf-ae9a-0b69034efe7b.png</url>
      <title>DEV Community: jay</title>
      <link>https://dev.to/jaymku</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jaymku"/>
    <language>en</language>
    <item>
      <title>Kafka for amateur 🫣</title>
      <dc:creator>jay</dc:creator>
      <pubDate>Mon, 30 Jun 2025 08:52:34 +0000</pubDate>
      <link>https://dev.to/jaymku/kafka-for-amateur-3df1</link>
      <guid>https://dev.to/jaymku/kafka-for-amateur-3df1</guid>
      <description>&lt;h2&gt;
  
  
  What is Apache Kafka? (In Simple Terms)
&lt;/h2&gt;

&lt;p&gt;Kafka is like a highway for data – it helps different parts of your system talk to each other reliably , even when there’s a lot of traffic.&lt;/p&gt;

&lt;p&gt;🧠 Think of it as:&lt;br&gt;
A post office that handles millions of letters per second.&lt;br&gt;
A conveyor belt in a factory, moving messages between machines.&lt;br&gt;
A buffer between systems so nothing gets lost.&lt;/p&gt;
&lt;h2&gt;
  
  
  Main Components vs Real-World Example 🌏
&lt;/h2&gt;

&lt;p&gt;Producer : Someone who writes and sends letters&lt;br&gt;
Consumer : Someone who receives and reads letters&lt;br&gt;
Topic    : The "mailbox" where similar letters go&lt;br&gt;
Broker   : The post office that manages the mail&lt;br&gt;
Cluster  : Multiple post offices working together&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+----------+         +------------------+         +-----------+
| Producer | ------&amp;gt; | Kafka (Topic)    | ------&amp;gt; | Consumer  |
+----------+         | (Mailbox)        |         +-----------+
                     +------------------+
                              ↑
                     Messages are stored
                     for a while (like logs)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why Use Kafka? 💨
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Fast : Handles millions of events per second.&lt;/li&gt;
&lt;li&gt;Scalable : Add more servers if you need more power.&lt;/li&gt;
&lt;li&gt;Fault-tolerant : If one server dies, others keep running.&lt;/li&gt;
&lt;li&gt;Real-time processing : Great for live dashboards, streaming apps, data pipelines etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🍽 How to Get Started with Kafka
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Download Kafka
&lt;/h3&gt;

&lt;p&gt;Go to: &lt;a href="https://kafka.apache.org/downloads" rel="noopener noreferrer"&gt;https://kafka.apache.org/downloads&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Download the latest version (choose the binary version).&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Start Kafka Locally
&lt;/h3&gt;

&lt;p&gt;Open terminal or command prompt and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Extract the downloaded file
tar -xzf kafka_2.13-3.x.x.tgz
cd kafka_2.13-3.x.x
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start ZooKeeper first (used to manage Kafka):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Start ZooKeeper
bin/zookeeper-server-start.sh config/zookeeper.properties
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open another terminal and start Kafka :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Start Kafka
bin/kafka-server-start.sh config/server.properties
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Create a Topic
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bin/kafka-topics.sh --create --topic my-first-topic --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Start a Producer
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bin/kafka-console-producer.sh --topic my-first-topic --bootstrap-server localhost:9092
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now type some messages like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello there, DEV community!
This is my first message.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Start a Consumer
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bin/kafka-console-consumer.sh --topic my-first-topic --bootstrap-server localhost:9092 --from-beginning
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You're officially on your way to becoming a Kafka-savvy learner!🎓&lt;/p&gt;

&lt;p&gt;If you're still feeling stuck, don't worry — it's totally normal. The best place to deepen your understanding is straight from the source : &lt;a href="https://kafka.apache.org/documentation/?spm=a2ty_o01.29997173.0.0.1188c921utQuBb" rel="noopener noreferrer"&gt;Apache Kafka Official Documentation&lt;/a&gt; or &lt;a href="https://developer.confluent.io/courses/apache-kafka/events/" rel="noopener noreferrer"&gt;interactive version from Confluent&lt;/a&gt; ⭐️ . It might seem dense at first, but it’s a goldmine for building strong foundations.&lt;/p&gt;

&lt;p&gt;💡 Pro Tip: Skip the "quick learn" videos promising overnight expertise. True mastery comes from curiosity, practice, and reading the docs like a pro.&lt;/p&gt;

&lt;p&gt;Keep exploring, keep learning, and remember — every expert was once a beginner.&lt;/p&gt;

&lt;p&gt;Happy Learning! 🚀.   &lt;/p&gt;

</description>
      <category>kafka</category>
      <category>systemdesign</category>
      <category>analytics</category>
      <category>data</category>
    </item>
  </channel>
</rss>
