<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How-To Guides on Advanced Beginner</title><link>https://advanced-beginner.github.io/en/docs/kafka/howto/</link><description>Recent content in How-To Guides on Advanced Beginner</description><generator>Hugo</generator><language>en-US</language><managingEditor>d8lzz1gpw@mozmail.com (kimbenji)</managingEditor><webMaster>d8lzz1gpw@mozmail.com (kimbenji)</webMaster><lastBuildDate>Mon, 23 Mar 2026 19:08:15 +0900</lastBuildDate><atom:link href="https://advanced-beginner.github.io/en/docs/kafka/howto/index.xml" rel="self" type="application/rss+xml"/><item><title>Consumer Lag Troubleshooting</title><link>https://advanced-beginner.github.io/en/docs/kafka/howto/consumer-lag-troubleshooting/</link><pubDate>Sat, 10 Jan 2026 00:00:00 +0000</pubDate><author>d8lzz1gpw@mozmail.com (kimbenji)</author><guid>https://advanced-beginner.github.io/en/docs/kafka/howto/consumer-lag-troubleshooting/</guid><description>&lt;p&gt;A step-by-step guide to diagnosing and resolving Consumer Lag issues.&lt;/p&gt;
&lt;blockquote class="book-hint info"&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Consumer Lag&lt;/strong&gt;: Number of unread messages (Producer rate &amp;gt; Consumer processing rate)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Diagnosis&lt;/strong&gt;: Check Lag with &lt;code&gt;kafka-consumer-groups.sh&lt;/code&gt;, analyze trends with monitoring tools&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resolution&lt;/strong&gt;: Increase Consumer count, optimize processing logic, adjust Partition count, tune batch settings&lt;/li&gt;
&lt;/ul&gt;

&lt;/blockquote&gt;

&lt;h2 id="what-is-consumer-lag"&gt;What is Consumer Lag?&lt;a class="anchor" href="#what-is-consumer-lag"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Consumer Lag is the number of messages that the Consumer has not yet read from those published by the Producer. If Lag continuously increases, message processing delays occur, and in the worst case, messages may be deleted after exceeding the retention period.&lt;/p&gt;</description></item><item><title>Producer Performance Tuning</title><link>https://advanced-beginner.github.io/en/docs/kafka/howto/producer-performance-tuning/</link><pubDate>Sat, 10 Jan 2026 00:00:00 +0000</pubDate><author>d8lzz1gpw@mozmail.com (kimbenji)</author><guid>https://advanced-beginner.github.io/en/docs/kafka/howto/producer-performance-tuning/</guid><description>&lt;p&gt;A step-by-step guide to increasing Producer throughput and reducing latency.&lt;/p&gt;
&lt;blockquote class="book-hint info"&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Throughput priority&lt;/strong&gt;: Increase &lt;code&gt;batch.size&lt;/code&gt;, set &lt;code&gt;linger.ms&lt;/code&gt;, enable compression&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Latency priority&lt;/strong&gt;: &lt;code&gt;linger.ms=0&lt;/code&gt;, &lt;code&gt;acks=1&lt;/code&gt;, small batch size&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Durability priority&lt;/strong&gt;: &lt;code&gt;acks=all&lt;/code&gt;, &lt;code&gt;enable.idempotence=true&lt;/code&gt;, retry settings&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Trade-offs&lt;/strong&gt;: Throughput, latency, and durability are competing concerns&lt;/li&gt;
&lt;/ul&gt;

&lt;/blockquote&gt;

&lt;h2 id="three-axes-of-performance-optimization"&gt;Three Axes of Performance Optimization&lt;a class="anchor" href="#three-axes-of-performance-optimization"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Producer performance optimization is about balancing three factors:&lt;/p&gt;
&lt;pre class="mermaid"&gt;flowchart TB
 T[Throughput] &amp;lt;--&amp;gt; L[Latency]
 L &amp;lt;--&amp;gt; D[Durability]
 D &amp;lt;--&amp;gt; T

 style T fill:#e1f5fe
 style L fill:#fff3e0
 style D fill:#e8f5e9&lt;/pre&gt;&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Factor&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;th&gt;Optimization Direction&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Throughput&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Messages sent per second&lt;/td&gt;
 &lt;td&gt;Increase batch size, enable compression&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Latency&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Time from send to acknowledgment&lt;/td&gt;
 &lt;td&gt;Reduce batch wait time&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Durability&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Message loss prevention&lt;/td&gt;
 &lt;td&gt;acks=all, wait for replication&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id="step-1-measure-current-performance"&gt;Step 1: Measure Current Performance&lt;a class="anchor" href="#step-1-measure-current-performance"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Measure current performance before optimizing. Without a baseline, you cannot know the improvement effect.&lt;/p&gt;</description></item><item><title>Message Loss Prevention Guide</title><link>https://advanced-beginner.github.io/en/docs/kafka/howto/message-loss-prevention/</link><pubDate>Fri, 16 Jan 2026 00:00:00 +0000</pubDate><author>d8lzz1gpw@mozmail.com (kimbenji)</author><guid>https://advanced-beginner.github.io/en/docs/kafka/howto/message-loss-prevention/</guid><description>&lt;p&gt;A step-by-step guide on how to prevent message loss and ensure reliable messaging in Kafka.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Time Required&lt;/strong&gt;: Approximately 30 minutes (for configuration application)&lt;/p&gt;
&lt;blockquote class="book-hint info"&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Producer side&lt;/strong&gt;: &lt;code&gt;acks=all&lt;/code&gt;, &lt;code&gt;enable.idempotence=true&lt;/code&gt;, proper retry settings&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Broker side&lt;/strong&gt;: &lt;code&gt;min.insync.replicas=2&lt;/code&gt;, &lt;code&gt;unclean.leader.election.enable=false&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Consumer side&lt;/strong&gt;: Manual commit, commit after processing, retry mechanism&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;End-to-End&lt;/strong&gt;: Message trace ID, monitoring and alerting setup&lt;/li&gt;
&lt;/ul&gt;

&lt;/blockquote&gt;

&lt;hr&gt;
&lt;h2 id="before-you-begin"&gt;Before You Begin&lt;a class="anchor" href="#before-you-begin"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You need the following environment to follow this guide.&lt;/p&gt;
&lt;h3 id="prerequisites"&gt;Prerequisites&lt;a class="anchor" href="#prerequisites"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Item&lt;/th&gt;
 &lt;th&gt;Minimum Version&lt;/th&gt;
 &lt;th&gt;Verification Command&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Apache Kafka&lt;/td&gt;
 &lt;td&gt;2.8+&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;kafka-topics.sh --version&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Java&lt;/td&gt;
 &lt;td&gt;17+&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;java -version&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Spring Boot&lt;/td&gt;
 &lt;td&gt;3.0+&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;./gradlew dependencies | grep spring-boot&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Spring Kafka&lt;/td&gt;
 &lt;td&gt;3.0+&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;./gradlew dependencies | grep spring-kafka&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="environment-verification"&gt;Environment Verification&lt;a class="anchor" href="#environment-verification"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Verify that you can access the Kafka cluster:&lt;/p&gt;</description></item><item><title>Topic Design and Partition Planning Guide</title><link>https://advanced-beginner.github.io/en/docs/kafka/howto/topic-design/</link><pubDate>Fri, 16 Jan 2026 00:00:00 +0000</pubDate><author>d8lzz1gpw@mozmail.com (kimbenji)</author><guid>https://advanced-beginner.github.io/en/docs/kafka/howto/topic-design/</guid><description>&lt;p&gt;A guide on how to determine the appropriate partition count, replication factor, and retention policy when creating new Kafka topics.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Time Required&lt;/strong&gt;: Approximately 15 minutes&lt;/p&gt;
&lt;blockquote class="book-hint info"&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Partition count&lt;/strong&gt;: Target throughput / Per-consumer throughput, minimum 6 recommended&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Replication factor&lt;/strong&gt;: 3 for production, 1 for development&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retention period&lt;/strong&gt;: Business requirements + reprocessing buffer time&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Naming&lt;/strong&gt;: Use &lt;code&gt;{domain}.{entity}.{event-type}&lt;/code&gt; pattern&lt;/li&gt;
&lt;/ul&gt;

&lt;/blockquote&gt;

&lt;hr&gt;
&lt;h2 id="before-you-begin"&gt;Before You Begin&lt;a class="anchor" href="#before-you-begin"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="prerequisites"&gt;Prerequisites&lt;a class="anchor" href="#prerequisites"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Item&lt;/th&gt;
 &lt;th&gt;Requirement&lt;/th&gt;
 &lt;th&gt;Verification Command&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Kafka CLI&lt;/td&gt;
 &lt;td&gt;Installed and in PATH&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;kafka-topics.sh --version&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Broker Access&lt;/td&gt;
 &lt;td&gt;Admin privileges&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;kafka-acls.sh --list&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Cluster Info&lt;/td&gt;
 &lt;td&gt;Know Broker count&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;kafka-broker-api-versions.sh&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="environment-verification"&gt;Environment Verification&lt;a class="anchor" href="#environment-verification"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Verify topic creation permissions and cluster status:&lt;/p&gt;</description></item></channel></rss>