{"id":27476,"date":"2023-08-28T11:17:56","date_gmt":"2023-08-28T09:17:56","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=27476"},"modified":"2023-08-28T11:17:56","modified_gmt":"2023-08-28T09:17:56","slug":"apache-kafka-concepts-by-example","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/","title":{"rendered":"Apache Kafka Concepts by Example"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In this blog post, I will demonstrate the first few concepts to understand when you want to learn <a href=\"https:\/\/kafka.apache.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Apache Kafka<\/a>. Documentation explains it well, but I find that concrete examples give a better feeling of the product and features.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-message-and-broker\">Message and Broker<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Kafka uses the message (also known as event or record) as the unit of data. Optionally, they can have a key and a value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>broker <\/strong>is the process in charge of storing and providing this data. Typically, for high availability, three brokers will make a Kafka cluster.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In my lab, I setup a Kafka cluster with 3 hosts using KRaft. I will not go too much into detail but what you must know is that KRaft is the Kafka implementation of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Raft_(algorithm)\" target=\"_blank\" rel=\"noreferrer noopener\">Raft protocol<\/a>. It maintains cluster state and metadata.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark class=\"has-inline-color has-vivid-cyan-blue-color\">Keep in mind that messages are immutable.<\/mark><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-topics\">Topics<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>topic <\/strong>is a way to organize messages within Kafka.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To create a topic, I simply trigger following command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ .\/bin\/kafka-topics.sh --create --topic events --replication-factor 1 --partitions 1 --bootstrap-server localhost:9092\nCreated topic events.\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">bootstrap server is the initial Kafka broker list where to address the request. I will explain replication factor and partition later.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s run a consumer with the tool provided with Kafka package:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ .\/bin\/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic events\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">And now, I can produce a simple &#8220;Hello&#8221; message:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ .\/bin\/kafka-console-producer.sh --bootstrap-server localhost:9092 --topic events\n&gt; Hello\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Message will appear on the first windows as soon as it is produced.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-partition\">Partition<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For now, with the topic I have created, I have no high availability. Let&#8217;s get more information about the events topic:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n.\/bin\/kafka-topics.sh --describe --bootstrap-server localhost:9092 --topic events\nTopic: events   TopicId: 64J4x3HcTF-WyJD_V9kpnw PartitionCount: 1       ReplicationFactor: 1    Configs: segment.bytes=1073741824\n        Topic: events   Partition: 0    Leader: 3       Replicas: 3     Isr: 3\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">From that command output, I see:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>There is only one partition (PartitionCount) which number is 0<\/li>\n\n\n\n<li>The partition leader is the node id 3 (the third node of the cluster, host kafka-03). The leader is responsible for handling all read and write operations for that partition.<\/li>\n\n\n\n<li>The replica (the main data) is on the node id 3. It is not the amount of replica.<\/li>\n\n\n\n<li>In Sync Replica (Isr) is on the node id 3 as well. Node 3 is obviously in sync with himself.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">What is interesting to note is that I trigger the topic creation command from node 1 and, still, unique partition is on node 3.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Without any replication, that means that if I stop Kafka service on node 3, I will not be able to read message from it. <code>kafka-console-consumer.sh<\/code> will not display anything (no error, no output). As soon as server is started again, message will be displayed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One important point to have in mind is that consumer do not delete message when consumed as it does on a JMS (Java Message Service). <mark class=\"has-inline-color has-vivid-cyan-blue-color\">Messages are only deleted by purging mechanism.<\/mark><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-topic-with-3-partitions\">Topic with 3 Partitions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s create another topic with 3 partitions and check describe output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nTopic: events3p TopicId: j3ootU5ESCCVQSZIsFdWqw PartitionCount: 3       ReplicationFactor: 1    Configs: segment.bytes=1073741824\n        Topic: events3p Partition: 0    Leader: 1       Replicas: 1     Isr: 1\n        Topic: events3p Partition: 1    Leader: 2       Replicas: 2     Isr: 2\n        Topic: events3p Partition: 2    Leader: 3       Replicas: 3     Isr: 3\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">From that command output, I see:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Topic has 3 partitions as expected \ud83d\ude42<\/li>\n\n\n\n<li>Each partition has its own leader.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">To load balance messages across partitions, we need to produce messages with a key. I create a simple text file with following content:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n1:message1\n2:message2\n3:message3\n4:message4\n5:message5\n6:message6\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">And pipe content to the console producer script:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ cat messages | .\/bin\/kafka-console-producer.sh --bootstrap-server localhost:9092 --property &quot;key.separator=:&quot; --property &quot;parse.key=true&quot; --topic events3p\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">As you might have noticed, I added two options:<\/p>\n\n\n\n<ul class=\"nv-cv-m wp-block-list\">\n<li><code>key.separator<\/code> to indicate how key and value can be split.<\/li>\n\n\n\n<li><code>parse.key<\/code> to indicate that message contains a key that can be used to send message to a specific partition.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The key is hashed and all keys having the same hash will be sent to the same partition.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s run consumer again and see what is displayed:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/bin\/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic events3p --from-beginning --property print.key=true\n1       message1\n5       message5\n2       message2\n3       message3\n4       message4\n6       message6\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">As you can see messages are not ordered. <mark class=\"has-inline-color has-vivid-cyan-blue-color\">Order is only guaranteed in the same partition<\/mark>. So, give it a try by adding argument <code>--partition<\/code> to the command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n.\/bin\/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic events3p --from-beginning --property print.key=true --partition 0\n1       message1\n5       message5\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n.\/bin\/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic events3p --from-beginning --property print.key=true --partition 1\n4       message4\n6       message6\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n.\/bin\/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic events3p --from-beginning --property print.key=true --partition 2\n2       message2\n3       message3\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-if-a-broker-is-down\">What if a broker is down?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If I am trying to consume while node 3 is down, data from partition hosted on that host will not be displayed (partition 2 as shown by described output). This is not good if HA is a requirement. Let&#8217;s see how to improve that.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-replica\">Replica<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To overcome previous chapter limitation, we can increase the replication factor. This is the amount of replica of each partition. Let&#8217;s create a topic with 3 partitions and 3 replicas:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ .\/bin\/kafka-topics.sh --create --topic events3p3r --replication-factor 3 --partitions 3  --bootstrap-server localhost:9092\nCreated topic events3p3r.\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">And check the describe output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nTopic: events3p3r       TopicId: A28jo7arTSCGZfpUIdl2Ag PartitionCount: 3       ReplicationFactor: 3    Configs: segment.bytes=1073741824\n        Topic: events3p3r       Partition: 0    Leader: 1       Replicas: 1,2,3 Isr: 1,2,3\n        Topic: events3p3r       Partition: 1    Leader: 2       Replicas: 2,3,1 Isr: 2,3,1\n        Topic: events3p3r       Partition: 2    Leader: 3       Replicas: 3,1,2 Isr: 3,1,2\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">What do we learn from that output ?<\/p>\n\n\n\n<ul class=\"nv-cv-m wp-block-list\">\n<li>Each partition has its leader<\/li>\n\n\n\n<li>The first id in the replicas field is the leader.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If I stop node 3, output will change:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nTopic: events3p3r       TopicId: A28jo7arTSCGZfpUIdl2Ag PartitionCount: 3       ReplicationFactor: 3    Configs: segment.bytes=1073741824\n        Topic: events3p3r       Partition: 0    Leader: 1       Replicas: 1,2,3 Isr: 1,2\n        Topic: events3p3r       Partition: 1    Leader: 2       Replicas: 2,3,1 Isr: 2,1\n        Topic: events3p3r       Partition: 2    Leader: 1       Replicas: 3,1,2 Isr: 1,2\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">As you can see, the leader of third partition (#2) changed to 1. ISR does not show node 3 as being in sync for any of the partitions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If I bring up node 3, leader third partition will remain on node 1:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nTopic: events3p3r       TopicId: A28jo7arTSCGZfpUIdl2Ag PartitionCount: 3       ReplicationFactor: 3    Configs: segment.bytes=1073741824\n        Topic: events3p3r       Partition: 0    Leader: 1       Replicas: 1,2,3 Isr: 1,2,3\n        Topic: events3p3r       Partition: 1    Leader: 2       Replicas: 2,3,1 Isr: 2,1,3\n        Topic: events3p3r       Partition: 2    Leader: 1       Replicas: 3,1,2 Isr: 1,2,3\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-next\">Next<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is quite a long, but necessary, introduction on very important concepts of Apache Kafka. We only scratched the surface of many of the notions required to understand Kafka.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are many more topics ( \ud83d\ude42 ) to cover in regards to Kafka like:<\/p>\n\n\n\n<ul class=\"nv-cv-d nv-cv-m wp-block-list\">\n<li><a href=\"https:\/\/kafka.apache.org\/documentation\/#connect\" target=\"_blank\" rel=\"noreferrer noopener\">Kafka Connect<\/a> to interface any system with Apache Kafka to ingest and consume messages<\/li>\n\n\n\n<li><a href=\"https:\/\/kafka.apache.org\/35\/documentation\/streams\/\" target=\"_blank\" rel=\"noreferrer noopener\">Kafka Streams<\/a> to transform, enrich messages in Kafka<\/li>\n\n\n\n<li>Schema registry to centralize, manage and validate message data format<\/li>\n\n\n\n<li>Security and encryption<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In this blog post, I will demonstrate the first few concepts to understand when you want to learn Apache Kafka. Documentation explains it well, but I find that concrete examples give a better feeling of the product and features. Message and Broker Kafka uses the message (also known as event or record) as the unit&hellip;&nbsp;<\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4134],"tags":[3064,1103],"class_list":["post-27476","post","type-post","status-publish","format-standard","category-application-server","tag-apache-kafka","tag-kafka"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.8 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Apache Kafka Concepts by Example - dbi services Blog<\/title>\n<meta name=\"description\" content=\"What is important to understand in Apache Kafka\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Kafka Concepts by Example\" \/>\n<meta property=\"og:description\" content=\"What is important to understand in Apache Kafka\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-28T09:17:56+00:00\" \/>\n<meta name=\"author\" content=\"Middleware Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Middleware Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/apache-kafka-concepts-by-example\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/apache-kafka-concepts-by-example\\\/\"},\"author\":{\"name\":\"Middleware Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8a0bfec3c3bd1f27d3d452eaa592bfb8\"},\"headline\":\"Apache Kafka Concepts by Example\",\"datePublished\":\"2023-08-28T09:17:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/apache-kafka-concepts-by-example\\\/\"},\"wordCount\":796,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"keywords\":[\"Apache Kafka\",\"kafka\"],\"articleSection\":[\"Application Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/apache-kafka-concepts-by-example\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/apache-kafka-concepts-by-example\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/apache-kafka-concepts-by-example\\\/\",\"name\":\"Apache Kafka Concepts by Example - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2023-08-28T09:17:56+00:00\",\"description\":\"What is important to understand in Apache Kafka\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/apache-kafka-concepts-by-example\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/apache-kafka-concepts-by-example\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/apache-kafka-concepts-by-example\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apache Kafka Concepts by Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8a0bfec3c3bd1f27d3d452eaa592bfb8\",\"name\":\"Middleware Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"caption\":\"Middleware Team\"},\"description\":\"Posts published under the Middleware Team account are collective contributions by the dbi services middleware and enterprise content management consultants. The practice covers ECM platforms such as OpenText Documentum, Alfresco, and M-Files, as well as application servers and integration technologies including WebLogic, JBoss, Tomcat, and the Elastic Stack, from architecture and deployment to operations under service level agreements.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/middleware-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Apache Kafka Concepts by Example - dbi services Blog","description":"What is important to understand in Apache Kafka","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:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/","og_locale":"en_US","og_type":"article","og_title":"Apache Kafka Concepts by Example","og_description":"What is important to understand in Apache Kafka","og_url":"https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2023-08-28T09:17:56+00:00","author":"Middleware Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Middleware Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/"},"author":{"name":"Middleware Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8a0bfec3c3bd1f27d3d452eaa592bfb8"},"headline":"Apache Kafka Concepts by Example","datePublished":"2023-08-28T09:17:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/"},"wordCount":796,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"keywords":["Apache Kafka","kafka"],"articleSection":["Application Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/","url":"https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/","name":"Apache Kafka Concepts by Example - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2023-08-28T09:17:56+00:00","description":"What is important to understand in Apache Kafka","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/apache-kafka-concepts-by-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Apache Kafka Concepts by Example"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8a0bfec3c3bd1f27d3d452eaa592bfb8","name":"Middleware Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","caption":"Middleware Team"},"description":"Posts published under the Middleware Team account are collective contributions by the dbi services middleware and enterprise content management consultants. The practice covers ECM platforms such as OpenText Documentum, Alfresco, and M-Files, as well as application servers and integration technologies including WebLogic, JBoss, Tomcat, and the Elastic Stack, from architecture and deployment to operations under service level agreements.","url":"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/27476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=27476"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/27476\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=27476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=27476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=27476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}