{"id":577,"date":"2026-09-13T09:36:52","date_gmt":"2026-09-13T09:36:52","guid":{"rendered":"https:\/\/prwatech.in\/blog\/?p=577"},"modified":"2026-09-14T15:54:49","modified_gmt":"2026-09-14T15:54:49","slug":"apache-kafka-use-case-tutorial","status":"publish","type":"post","link":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/","title":{"rendered":"Apache Spark Kafka Usecase"},"content":{"rendered":"<h1 style=\"text-align: left;\">Apache Kafka Use Case Tutorial<\/h1>\n<p>Welcome to the world of advanced Tutorials on the use case for apache spark. Are you looking forward to the Use case example of the Kafka Platform? Or looking for some help on the use case for Kafka streams? Then you\u2019ve landed on the Right Path which providing advanced tutorial Based concepts on the Apache Kafka Use Case Examples. In this tutorial, one can easily explore apache Apache Spark real-world Use Cases with step by step explanation.<\/p>\n<p>If you are the one who wanted to become an expert in Apache spark? Or the one who wanted to explore the technology like a Pro under the certified experts with world-class classroom training environment, then asks your Apache spark training institute experts who offer <a href=\"https:\/\/prwatech.in\/apache-spark-training-institute-in-bangalore\/\">advanced Apache spark training<\/a>. Follow the below-mentioned Apache spark use case tutorial and enhance your skills to become a professional Spark Developer.<\/p>\n<h2>Apache Kafka Use Case<\/h2>\n<p>The examples below walk through core Kafka operations using the command line tools that ship with Kafka: creating a topic, sending and receiving messages, replicating a topic across brokers, and deleting a topic.<\/p>\n<h3><strong>Case 1.\u00a0 One producer and one consumer<\/strong><\/h3>\n<p><strong>Create a topic named Hello Kafka:<\/strong><\/p>\n<p>bin\/Kafka-topics.sh &#8211;&gt;create &#8211;&gt;zookeeper localhost:2181 &#8211;&gt;replication-factor 1 &#8211;&gt;partitions 1 &#8211;&gt;topic Hello-Kafka<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-856\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/1-14.png\" alt=\"Apache Kafka Use Case Example\" width=\"850\" height=\"83\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/1-14.png 605w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/1-14-300x29.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong> bin\/Kafka-console-producer.sh &#8211;broker-list localhost:9092 &#8211;topic Hello-Kafka<\/strong><\/p>\n<p>Start a producer and write a message to that topic:<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-857\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/3-14.png\" alt=\"Run the broker\" width=\"850\" height=\"83\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/3-14.png 602w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/3-14-300x29.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong>Run the consumer<\/strong><\/p>\n<p><strong>bin\/Kafka-console-consumer.sh &#8211;bootstrap-server localhost:9092 &#8211;topic test &#8211;from-beginning<\/strong><\/p>\n<p>Start a consumer to read messages from the same topic, from the beginning:<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-858\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/5-10.png\" alt=\"You will get the message from producer\" width=\"850\" height=\"133\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/5-10.png 601w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/5-10-300x47.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<h3>Case 2: Creating a Replicated Topic<\/h3>\n<p>This case creates a topic with a replication factor of 2, meaning each message is kept on two brokers instead of one. A replication factor of 2 needs at least two brokers running to succeed, which is what Case 3, right after this one, sets up. If you try this on a single broker setup, Kafka will reject it with a replication factor error, so come back to this step once your second broker is running.<\/p>\n<p><strong>bin\/Kafka-topics.sh &#8211;create &#8211;zookeeper localhost:2181 &#8211;replication-factor 2 &#8211;partitions 1 &#8211;topic\u00a0Multibrokerapplication<\/strong><\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-859\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/10-7.png\" alt=\"topic\u00a0Multibrokerapplication\" width=\"850\" height=\"100\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/10-7.png 602w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/10-7-300x35.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong>bin\/Kafka-console-producer.sh &#8211;broker-list localhost:9092 &#8211;topic Multibrokerapplication<\/strong><\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-860\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/12-5.png\" alt=\"topic\u00a0Multibrokerapplication 2\" width=\"850\" height=\"128\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/12-5.png 599w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/12-5-300x45.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong>bin\/Kafka-console-consumer.sh &#8211;bootstrap-server localhost:9092 &#8211;topic institute &#8211;from-beginning<\/strong><\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-861\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/13-5.png\" alt=\"topic institute --from-beginning\" width=\"850\" height=\"103\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/13-5.png 601w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/13-5-300x36.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<h3>Case 3: Setting Up a Multi Broker Cluster<\/h3>\n<p>The classic way to add a second broker on the same machine was to copy server.properties into a new file, such as server-one.properties, and give it its own broker ID, port, and log directory. That approach was built for ZooKeeper based Kafka. In current KRaft based Kafka, there is no ZooKeeper config to point additional brokers at, so the setup steps differ: each node in a KRaft cluster needs its storage formatted with a shared cluster ID using the kafka-storage.sh tool, and node roles, broker, controller or both, are set directly in that node&#8217;s own properties file instead of being copied from a ZooKeeper connected template.<br \/>\nBecause this setup process genuinely changed rather than just moving a flag, I am not going to give you specific KRaft cluster commands here without the ability to verify them step by step against a live cluster. The official Apache Kafka quickstart documentation walks through the current KRaft multi broker setup with commands maintained directly by the Kafka project, and is the more reliable source to follow for this specific case.<br \/>\nThe screenshots below are kept from the original tutorial as a reference for the ZooKeeper era process, useful for understanding the shape of the older approach, but they should not be followed step by step on a current Kafka installation.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-862\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/6-10.png\" alt=\"Apache Kafka Use Case Example 3\" width=\"850\" height=\"22\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/6-10.png 583w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/6-10-300x8.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong>Now edit these new files and set the following properties:<\/strong><\/p>\n<p><strong>config\/server-one.properties<\/strong><\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-863\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/7-10.png\" alt=\"config\/server-one.properties\" width=\"850\" height=\"700\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/7-10.png 408w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/7-10-300x247.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong>We already have Zookeeper and our single node started, so we just need to start the two new nodes<\/strong><\/p>\n<p><strong> bin\/Kafka-server-start.sh config\/server-one.properties<\/strong><\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-864\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/9-7.png\" alt=\"config\/server-one.properties 2\" width=\"850\" height=\"40\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/9-7.png 602w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/9-7-300x14.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong>Now create a new topic with a replication factor of three:<\/strong><\/p>\n<p><strong> bin\/Kafka-topics.sh &#8211;create &#8211;zookeeper localhost:2181 &#8211;replication-factor 2 &#8211;partitions 1 &#8211;topic\u00a0Multibrokerapplication<\/strong><\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-859\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/10-7.png\" alt=\"config\/server-one.properties 3\" width=\"850\" height=\"100\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/10-7.png 602w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/10-7-300x35.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong>bin\/Kafka-topics.sh &#8211;describe &#8211;zookeeper localhost:2181 &#8211;topic\u00a0Multibrokerapplication<\/strong><\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-865\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/11-7.png\" alt=\"replication factor 2\" width=\"850\" height=\"143\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/11-7.png 602w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/11-7-300x50.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong>bin\/kafka-console-producer.sh &#8211;broker-list localhost:9092 &#8211;topic\u00a0Multibrokerapplication<\/strong><\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-860\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/12-5.png\" alt=\"broker-list localhost:9092\" width=\"850\" height=\"128\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/12-5.png 599w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/12-5-300x45.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong>bin\/kafka-console-consumer.sh &#8211;bootstrap-server localhost:9092 &#8211;from-beginning &#8211;topic\u00a0Multibrokerapplication<\/strong><\/p>\n<p><strong>\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-861\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/13-5.png\" alt=\"bootstrap-server localhost:9092\" width=\"850\" height=\"103\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/13-5.png 601w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/13-5-300x36.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<h3>Case 4: Deleting a Topic<\/h3>\n<p>The live page shows three screenshots for this case but never actually gives the delete command itself. To delete a topic:<\/p>\n<p>bin\/kafka-topics.sh &#8211;&gt;delete &#8211;&gt;bootstrap-server localhost:9092 &#8211;&gt;topic Multibrokerapplication<\/p>\n<p>Note that topic deletion needs to be enabled on the broker, through the delete.topic.enable setting, which defaults to true in current Kafka versions. If a delete appears to do nothing, this setting is the first thing to check.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-869\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/14-3.png\" alt=\"Deleting topic form list\" width=\"850\" height=\"146\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/14-3.png 600w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/14-3-300x52.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-867\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/15-3.png\" alt=\"Deleting topic form list 2\" width=\"850\" height=\"176\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/15-3.png 602w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/15-3-300x62.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-868\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/16-3.png\" alt=\"Deleting topic form list 3\" width=\"850\" height=\"111\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/16-3.png 603w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/16-3-300x39.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<h2>Common Mistakes to Avoid<\/h2>\n<ul>\n<li>Using &#8211;zookeeper on a current Kafka install. It no longer exists as of Kafka 4.0. Use &#8211;bootstrap-server for every topic management command.<\/li>\n<li>Setting a replication factor higher than your number of running brokers. Kafka cannot replicate a topic across more brokers than actually exist, and will reject the request outright.<\/li>\n<li>Producing to one topic name and consuming from another. It sounds obvious written out, but a small typo in a topic name is one of the most common reasons a consumer appears to receive nothing.<\/li>\n<\/ul>\n<p>Copying commands from an old tutorial or slide deck without checking the flags against your installed Kafka version. Kafka&#8217;s command line tools have changed meaningfully over the years, and a command that worked in an older training video may no longer work today.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/kVkY2gM4XCQ\" width=\"650\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>That covers core Kafka use cases from a single producer and consumer through a replicated, multi broker topic. To go further, explore <a href=\"https:\/\/prwatech.in\/apache-spark-training-institute-in-bangalore\/\"><strong><b>Prwatech&#8217;s Apache Spark training<\/b><\/strong><\/a>\u00a0program, which includes placement assistance.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache Kafka Use Case Tutorial Welcome to the world of advanced Tutorials on the use case for apache spark. Are you looking forward to the Use case example of the Kafka Platform? Or looking for some help on the use case for Kafka streams? Then you\u2019ve landed on the Right Path which providing advanced tutorial [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,1692],"tags":[363,364,854,856,853,851,852],"class_list":["post-577","post","type-post","status-publish","format-standard","hentry","category-apache-spark","category-apache-spark-kafka","tag-apache-kafka-use-case-example","tag-apache-kafka-use-case-tutorial","tag-example-in-kafka","tag-kafka-example-usecases","tag-kafka-examples","tag-kafka-use-cases","tag-use-cases-in-kafka"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Apache Kafka Use Case Tutorial: Producers to Topics<\/title>\n<meta name=\"description\" content=\"Practical Apache Kafka use cases, from a single producer and consumer to a replicated topic, updated for current Kafka since ZooKeeper mode is gone.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Kafka Use Case Tutorial: Producers to Topics\" \/>\n<meta property=\"og:description\" content=\"Practical Apache Kafka use cases, from a single producer and consumer to a replicated topic, updated for current Kafka since ZooKeeper mode is gone.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"Prwatech\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prwatech.in\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-13T09:36:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-14T15:54:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/1-14.png\" \/>\n\t<meta property=\"og:image:width\" content=\"605\" \/>\n\t<meta property=\"og:image:height\" content=\"59\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Prwatech\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:site\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prwatech\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/\",\"url\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/\",\"name\":\"Apache Kafka Use Case Tutorial: Producers to Topics\",\"isPartOf\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/1-14.png\",\"datePublished\":\"2026-09-13T09:36:52+00:00\",\"dateModified\":\"2026-09-14T15:54:49+00:00\",\"author\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\"},\"description\":\"Practical Apache Kafka use cases, from a single producer and consumer to a replicated topic, updated for current Kafka since ZooKeeper mode is gone.\",\"breadcrumb\":{\"@id\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/#primaryimage\",\"url\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/1-14.png\",\"contentUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/1-14.png\",\"width\":605,\"height\":59},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/prwatech.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apache Spark Kafka Usecase\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/prwatech.in\/blog\/#website\",\"url\":\"https:\/\/prwatech.in\/blog\/\",\"name\":\"Prwatech\",\"description\":\"Share Ideas, Start Something Good.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/prwatech.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\",\"name\":\"Prwatech\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"caption\":\"Prwatech\"},\"url\":\"https:\/\/prwatech.in\/blog\/author\/prwatech123\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache Kafka Use Case Tutorial: Producers to Topics","description":"Practical Apache Kafka use cases, from a single producer and consumer to a replicated topic, updated for current Kafka since ZooKeeper mode is gone.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/","og_locale":"en_US","og_type":"article","og_title":"Apache Kafka Use Case Tutorial: Producers to Topics","og_description":"Practical Apache Kafka use cases, from a single producer and consumer to a replicated topic, updated for current Kafka since ZooKeeper mode is gone.","og_url":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/","og_site_name":"Prwatech","article_publisher":"https:\/\/www.facebook.com\/prwatech.in\/","article_published_time":"2026-09-13T09:36:52+00:00","article_modified_time":"2026-09-14T15:54:49+00:00","og_image":[{"width":605,"height":59,"url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/1-14.png","type":"image\/png"}],"author":"Prwatech","twitter_card":"summary_large_image","twitter_creator":"@Eduprwatech","twitter_site":"@Eduprwatech","twitter_misc":{"Written by":"Prwatech","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/","url":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/","name":"Apache Kafka Use Case Tutorial: Producers to Topics","isPartOf":{"@id":"https:\/\/prwatech.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/#primaryimage"},"image":{"@id":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/1-14.png","datePublished":"2026-09-13T09:36:52+00:00","dateModified":"2026-09-14T15:54:49+00:00","author":{"@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3"},"description":"Practical Apache Kafka use cases, from a single producer and consumer to a replicated topic, updated for current Kafka since ZooKeeper mode is gone.","breadcrumb":{"@id":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/#primaryimage","url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/1-14.png","contentUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/1-14.png","width":605,"height":59},{"@type":"BreadcrumbList","@id":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-kafka\/apache-kafka-use-case-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/prwatech.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Apache Spark Kafka Usecase"}]},{"@type":"WebSite","@id":"https:\/\/prwatech.in\/blog\/#website","url":"https:\/\/prwatech.in\/blog\/","name":"Prwatech","description":"Share Ideas, Start Something Good.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/prwatech.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3","name":"Prwatech","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","caption":"Prwatech"},"url":"https:\/\/prwatech.in\/blog\/author\/prwatech123\/"}]}},"_links":{"self":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/comments?post=577"}],"version-history":[{"count":18,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/577\/revisions"}],"predecessor-version":[{"id":11755,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/577\/revisions\/11755"}],"wp:attachment":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media?parent=577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/categories?post=577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/tags?post=577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}