{"id":57660,"date":"2023-06-25T13:37:09","date_gmt":"2023-06-25T08:07:09","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=57660"},"modified":"2023-07-03T13:45:47","modified_gmt":"2023-07-03T08:15:47","slug":"how-to-install-apache-kafka-kafdrop-on-windowsfor-and-integrate-with-drupal","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/how-to-install-apache-kafka-kafdrop-on-windowsfor-and-integrate-with-drupal\/","title":{"rendered":"How to install Apache Kafka | Kafdrop on WindowsFor and integrate with Drupal"},"content":{"rendered":"<p>Apache Kafka is an open-source distributed event streaming platform. That uses Publish &amp; subscribe mechanism to stream the records.\u200b<\/p>\n<h2>Download &amp; Installing the Apache Kafka:<\/h2>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\">\u200b<span data-usefontface=\"false\" data-contrast=\"none\"><strong>Prerequisite<\/strong>: You should have Java (JDK) installed on your Windows machine.<\/span><\/p>\n<p><strong>Step -1:<\/strong> Download the binary version from the kafka official download page ( https:\/\/kafka.apache.org\/downloads )<\/p>\n<p><strong>Step -2:<\/strong> <span class=\"TextRun SCXP234905611 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP234905611 BCX8\">Unzip it and and rename the folder like kafka_binary &amp; paste the folder in c drive like C:\\dev\\kafka_binary<\/span><\/span><\/p>\n<p><strong>Step -3: <\/strong> <span class=\"TextRun SCXP57147660 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP57147660 BCX8\">Change the log path setting in the below files<\/span><\/span><\/p>\n<pre><span class=\"TextRun SCXP173891644 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP173891644 BCX8\">filename : C:\\dev\\kafka_binary\\config\\server.properties<\/span><\/span><span class=\"EOP SCXP173891644 BCX8\">\u200b<\/span><\/pre>\n<pre>Change :\u00a0 <span class=\"TextRun SCXP170933920 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"SpellingError SCXP170933920 BCX8\">log.dirs<\/span><\/span><span class=\"TextRun SCXP170933920 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP170933920 BCX8\">=\/<\/span><\/span><span class=\"TextRun SCXP170933920 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"SpellingError SCXP170933920 BCX8\">tmp<\/span><\/span><span class=\"TextRun SCXP170933920 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP170933920 BCX8\">\/<\/span><\/span><span class=\"TextRun SCXP170933920 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"SpellingError SCXP170933920 BCX8\">kafka<\/span><\/span><span class=\"TextRun SCXP170933920 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP170933920 BCX8\">-logs\u00a0 =&gt;\u00a0\u00a0<\/span><\/span><span class=\"TextRun SCXP170933920 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"SpellingError SCXP170933920 BCX8\">log.dirs<\/span><\/span><span class=\"TextRun SCXP170933920 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP170933920 BCX8\">=C:\/dev\/kafka_binary\/kafka-logs<\/span><\/span>\r\n\r\n<span class=\"EOP SCXP170933920 BCX8\">\u200b\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<span class=\"TextRun SCXP82598035 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP82598035 BCX8\">filename : C:\\dev\\kafka_binary\\config\\zookeeper.properties<\/span><\/span><\/span><\/pre>\n<pre>Change : <span class=\"TextRun SCXP175422420 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"SpellingError SCXP175422420 BCX8\">dataDir<\/span><\/span><span class=\"TextRun SCXP175422420 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP175422420 BCX8\">=C:\/tmp\/zookeeper\u00a0 =&gt;\u00a0<\/span><\/span><span class=\"TextRun SCXP175422420 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"SpellingError SCXP175422420 BCX8\">dataDir<\/span><\/span><span class=\"TextRun SCXP175422420 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP175422420 BCX8\">=C:\/dev\/kafka_binary\/zookeeper<\/span><\/span><\/pre>\n<p><span class=\"EOP SCXP175422420 BCX8\">Now Kafka is installed in your window machine &amp; we can start the Kafka server.\u00a0<\/span><\/p>\n<p>Kafka has a dependency on the zookeeper service, and this zookeeper is already inbuilt with our server; so first we need to start the zookeeper, then we can start the Kafka server.<\/p>\n<p>Kafka command uses 2 files as a key-value pair to execute the command, It means for every task, there is 1 file in .bin\\windows folder, which will work with the combination of .\\config folder on the right side bar.<\/p>\n<p>like<\/p>\n<pre> \r\n<span class=\"TextRun SCXP104578381 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP104578381 BCX8\">C:\\dev\\kafka_binary.\\bin\\windows\\\u00a0 =&gt; <span class=\"TextRun SCXP87071052 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP87071052 BCX8\">.\\config\\<\/span><\/span><\/span><\/span><\/pre>\n<h4>Kafka Uses with the Help of CLI :<\/h4>\n<p>Open the CMD command prompt &amp; perform the below commands,<\/p>\n<p><strong>Step -1: <\/strong><span class=\"TextRun SCXP87586248 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP87586248 BCX8\">Start the\u00a0<\/span><\/span><span class=\"TextRun SCXP87586248 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"SpellingError SCXP87586248 BCX8\">ZooKeeper<\/span><\/span><span class=\"TextRun SCXP87586248 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP87586248 BCX8\"> service by the below command, so it will start the Zookeeper server keep it running in this terminal; for performing any other cmd command, use another command prompt.<\/span><\/span><span class=\"EOP SCXP87586248 BCX8\">\u200b<\/span><\/p>\n<pre>C:\\dev\\kafka_binary.\\bin\\windows\\zookeeper-server-start.bat .\\config\\zookeeper.properties<\/pre>\n<div id=\"attachment_57652\" style=\"width: 681px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-57652\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-57652\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/Start-zookeeper-300x17.png\" alt=\"Start zooker server\" width=\"671\" height=\"38\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/Start-zookeeper-300x17.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Start-zookeeper-1024x59.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Start-zookeeper-768x44.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Start-zookeeper-624x36.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Start-zookeeper.png 1061w\" sizes=\"(max-width: 671px) 100vw, 671px\" \/><p id=\"caption-attachment-57652\" class=\"wp-caption-text\">Start zookeeper server<\/p><\/div>\n<p><strong>Step -2 :<\/strong> <span class=\"TextRun SCXP83376906 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP83376906 BCX8\">Start the Kafka broker <span class=\"TextRun SCXP87586248 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP87586248 BCX8\">service by the below command. So it will start the Kafka server keep it running in this terminal; for performing any other cmd command use the another command prompt.<\/span><\/span><\/span><\/span><\/p>\n<pre><span class=\"TextRun SCXP180687632 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP180687632 BCX8\">C:\\dev\\kafka_binary\\.\\bin\\windows\\kafka-server-start.bat .\\config\\<\/span><\/span><span class=\"TextRun SCXP180687632 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"SpellingError SCXP180687632 BCX8\">server.properties<\/span><\/span><span class=\"EOP SCXP180687632 BCX8\">\u200b<\/span><\/pre>\n<div id=\"attachment_57653\" style=\"width: 722px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-57653\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-57653\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/start-kafka-server-300x11.png\" alt=\"Start Kafka Server\" width=\"712\" height=\"26\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/start-kafka-server-300x11.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/start-kafka-server-768x28.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/start-kafka-server-624x23.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/start-kafka-server.png 983w\" sizes=\"(max-width: 712px) 100vw, 712px\" \/><p id=\"caption-attachment-57653\" class=\"wp-caption-text\">Start Kafka Server<\/p><\/div>\n<p><span class=\"EOP SCXP83376906 BCX8\">\u200b<strong>Step -3 : <\/strong>Now we can create <span class=\"TextRun SCXP173900569 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP173900569 BCX8\">a topic to store your event,<\/span><\/span><\/span><\/p>\n<pre><span class=\"EOP SCXP83376906 BCX8\"><span class=\"EOP SCXP173900569 BCX8\">\u200b<span class=\"TextRun BCX8 SCXP180426829\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun BCX8 SCXP180426829\">C:\\dev\\kafka_binary\\.\\bin\\windows\\kafka-topics.bat --create --topic topic_part2 --bootstrap-server <\/span><\/span><span class=\"TextRun BCX8 SCXP180426829\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun BCX8 SCXP180426829\">localhost:9092<\/span><\/span><\/span><\/span><\/pre>\n<p><span class=\"EOP SCXP83376906 BCX8\"><span class=\"EOP SCXP173900569 BCX8\"><span class=\"EOP BCX8 SCXP180426829\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-57654\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/Create-topic-300x15.png\" alt=\"Create Topic\" width=\"720\" height=\"36\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/Create-topic-300x15.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Create-topic-1024x52.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Create-topic-768x39.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Create-topic-624x32.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Create-topic.png 1468w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/>\u200b<\/span><\/span><\/span><\/p>\n<p><strong>Step -4 :<\/strong> <span class=\"TextRun SCXP101381233 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP101381233 BCX8\">Write some events into the topics<\/span><\/span><\/p>\n<pre><span class=\"TextRun SCXP181542781 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP181542781 BCX8\"><span class=\"EOP SCXP83376906 BCX8\"><span class=\"EOP SCXP173900569 BCX8\"><span class=\"TextRun BCX8 SCXP180426829\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun BCX8 SCXP180426829\">C:\\dev\\kafka_binary\\<\/span><\/span><\/span><\/span>.\\bin\\windows\\kafka-console-producer.bat --topic topic_part2 --bootstrap-server localhost:9092<\/span><\/span><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-57655\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/write-msg-in-topic-300x25.png\" alt=\"Write message in topic\" width=\"732\" height=\"61\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/write-msg-in-topic-300x25.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/write-msg-in-topic-1024x84.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/write-msg-in-topic-768x63.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/write-msg-in-topic-624x51.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/write-msg-in-topic.png 1075w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><\/p>\n<p><span class=\"EOP SCXP181542781 BCX8\">\u200b<strong>Step -5 : <\/strong>Read the messages from the topic which we save in step -4,\u00a0<\/span><\/p>\n<pre><span class=\"TextRun SCXP78460346 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP78460346 BCX8\"><span class=\"TextRun SCXP181542781 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP181542781 BCX8\"><span class=\"EOP SCXP83376906 BCX8\"><span class=\"EOP SCXP173900569 BCX8\"><span class=\"TextRun BCX8 SCXP180426829\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun BCX8 SCXP180426829\">C:\\dev\\kafka_binary\\<\/span><\/span><\/span><\/span><\/span><\/span>.\\bin\\windows\\kafka-console-consumer.bat --topic topic_part1 --from-beginning --bootstrap-server\u00a0<\/span><\/span><span class=\"TextRun SCXP78460346 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP78460346 BCX8\">localhost:9092<\/span><\/span><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-57656\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/Read-message-300x29.png\" alt=\"Read message from kafka\" width=\"745\" height=\"72\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/Read-message-300x29.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Read-message-1024x100.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Read-message-768x75.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Read-message-624x61.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Read-message.png 1227w\" sizes=\"(max-width: 745px) 100vw, 745px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>That is the whole process to create message in the topic and read the message from the topic.<\/p>\n<h2>Download &amp; Install PHP rd-Kafka Extension on Wamp :<\/h2>\n<p>I am using the Wamp &amp; PHP version 8.0.26, if you have any other PHP version, update the command accordingly.<\/p>\n<p>To enable the rd-kafka extension on wamp we need to download the DLL files from the below URL,<\/p>\n<p>Reference : <a class=\"Hyperlink SCXP56670387 BCX8\" href=\"https:\/\/arnaud.le-blanc.net\/php-rdkafka-doc\/phpdoc\/rdkafka.installation.windows.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"TextRun SCXP56670387 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP56670387 BCX8\">https:\/\/arnaud.le-blanc.net\/php-rdkafka-doc\/phpdoc\/rdkafka.installation.windows.html<\/span><\/span><\/a><\/p>\n<p>Download Link : http:\/\/pecl.php.net\/package\/rdkafka<\/p>\n<p>Before downloading the correct version please check your system information like below<\/p>\n<p>I am using the 5.0.2 version,<\/p>\n<p>http:\/\/pecl.php.net\/package\/rdkafka\/5.0.2\/windows<\/p>\n<p>I have Below configuration on my system please check all these config on your system if it differ then download the DLL based on that, otherwise it will not work properly.<\/p>\n<p>php -v = 8.0.26<br \/>\nrdkafka version = 5.0.2<br \/>\nOS Type = 64-bit<br \/>\nThread sefe = Enabled<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-57657\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/DLL-download-300x204.png\" alt=\"Dll-download-for rd-kafka\" width=\"399\" height=\"271\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/DLL-download-300x204.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/DLL-download-1024x697.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/DLL-download-768x523.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/DLL-download-624x425.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/DLL-download.png 1084w\" sizes=\"(max-width: 399px) 100vw, 399px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"TextRun SCXP218333019 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP218333019 BCX8\">Steps to configure the <\/span><\/span><span class=\"TextRun SCXP218333019 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"SpellingError SCXP218333019 BCX8\">rd-kafka<\/span><\/span><span class=\"TextRun SCXP218333019 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP218333019 BCX8\">\u00a0extension on Wamp<\/span><\/span><span class=\"EOP SCXP218333019 BCX8\">\u200b Server<\/span><\/h2>\n<p><strong>Step -1 :<\/strong> Paste the DLL files which we download on below Paths<\/p>\n<pre data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span data-usefontface=\"false\" data-contrast=\"none\">C:\\wamp64\\bin\\php\\php8.0.26\\\u00a0\u00a0 Paste the\u00a0<\/span><b><span data-usefontface=\"false\" data-contrast=\"none\">librdkafka.dll<\/span><\/b>\u200b\r\n\r\n<span data-usefontface=\"false\" data-contrast=\"none\">C:\\wamp64\\bin\\php\\php8.0.26\\ext\\ Paste the\u00a0<\/span><b><span data-usefontface=\"false\" data-contrast=\"none\">php_rdkafka.dll<\/span><\/b>\u200b<\/pre>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><strong>Step -2 : <\/strong>Enable the rd-kafka extension in below files<\/p>\n<pre data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span data-usefontface=\"false\" data-contrast=\"none\">C:\\wamp64\\bin\\php\\php8.0.26\\php.ini\u00a0 =&gt; Add\u00a0\u00a0<\/span><b><span data-usefontface=\"false\" data-contrast=\"none\">extension=php_rdkafka.dll<\/span><\/b>\u200b\r\n\r\n<span data-usefontface=\"false\" data-contrast=\"none\">C:\\wamp64\\bin\\apache\\apache2.4.54.2\\bin\\php.ini\u00a0\u00a0 =&gt; Add\u00a0\u00a0<\/span><b><span data-usefontface=\"false\" data-contrast=\"none\">extension=php_rdkafka.dll<\/span><\/b>\u200b<\/pre>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span class=\"TextRun SCXP246108883 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP246108883 BCX8\">Restart the server and verify with\u00a0<\/span><\/span><strong><span class=\"TextRun SCXP246108883 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"SpellingError SCXP246108883 BCX8\">php<\/span><\/span><\/strong><span class=\"TextRun SCXP246108883 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP246108883 BCX8\"><strong>\u00a0\u2013m<\/strong> , It should display the rdkafka extension in the list<\/span><\/span><\/p>\n<h2 data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span class=\"EOP SCXP246108883 BCX8\">Install &amp; configure the Kafka Web UI &#8211; Kafdrop\u200b<\/span><\/h2>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span data-usefontface=\"false\" data-contrast=\"none\">Requirement:\u00a0<\/span>\u200b<\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span data-usefontface=\"false\" data-contrast=\"none\">\u00a0 \u00a0 Java 11 or newer<\/span>\u200b<\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span data-usefontface=\"false\" data-contrast=\"none\">\u00a0 \u00a0Kafka (version 0.11.0 or newer)<\/span><\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\">Reference to download the kafdrop : <span class=\"TextRun SCXP246348184 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP246348184 BCX8\">https:\/\/github.com\/obsidiandynamics\/kafdrop\/releases<\/span><\/span><span class=\"EOP SCXP246348184 BCX8\">\u200b<\/span><\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><strong>Step -1:<\/strong> <span class=\"TextRun SCXP170932690 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP170932690 BCX8\">Download the jar files from\u00a0 below URL\u00a0<\/span><\/span><\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span class=\"EOP SCXP170932690 BCX8\"><span class=\"TextRun SCXP222180234 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP222180234 BCX8\">curl -LO https:\/\/github.com\/obsidiandynamics\/kafdrop\/releases\/download\/3.30.0\/kafdrop-3.30.0.jar<\/span><\/span><span class=\"EOP SCXP222180234 BCX8\">\u200b<\/span><\/span><\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span class=\"EOP SCXP170932690 BCX8\"><strong>Step -2:<\/strong> Rename the jar file<\/span><\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span class=\"EOP SCXP170932690 BCX8\"><span class=\"TextRun SCXP262616468 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP262616468 BCX8\">mv kafdrop-3.30.0.jar kafdrop.jar<\/span><\/span><span class=\"EOP SCXP262616468 BCX8\">\u200b<\/span><\/span><\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span class=\"EOP SCXP170932690 BCX8\"><strong>Step -3:<\/strong> <span class=\"TextRun SCXP188196625 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP188196625 BCX8\">Running\/Executing the jar file<\/span><\/span><\/span><\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span data-usefontface=\"false\" data-contrast=\"none\">java &#8211;add-opens=<\/span><span data-usefontface=\"false\" data-contrast=\"none\">java.base<\/span><span data-usefontface=\"false\" data-contrast=\"none\">\/sun.nio.ch=ALL-UNNAMED \\<\/span>\u200b<\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span data-usefontface=\"false\" data-contrast=\"none\">\u00a0\u00a0\u00a0 -jar \/c\/<\/span><span data-usefontface=\"false\" data-contrast=\"none\">kafdrop<\/span><span data-usefontface=\"false\" data-contrast=\"none\">\/kafdrop.jar \\<\/span>\u200b<\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><span data-usefontface=\"false\" data-contrast=\"none\">\u00a0\u00a0\u00a0 &#8212;<\/span><span data-usefontface=\"false\" data-contrast=\"none\">kafka.brokerConnect<\/span><span data-usefontface=\"false\" data-contrast=\"none\">=localhost:9092<\/span>\u200b<\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><strong>Step -4: <\/strong><span class=\"TextRun SCXP194627309 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP194627309 BCX8\">visit\u00a0http:\/\/localhost:9000\/<\/span><\/span><strong><span class=\"EOP SCXP194627309 BCX8\">\u200b<\/span><\/strong><\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\">It should display the UI like below,\u00a0 Make sure the Zookeeper &amp; Kafka server is running.<\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-57658\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/kafdrop-ui-300x124.png\" alt=\"kafdrop\" width=\"585\" height=\"242\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/kafdrop-ui-300x124.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/kafdrop-ui-1024x422.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/kafdrop-ui-768x317.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/kafdrop-ui-624x257.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/kafdrop-ui.png 1084w\" sizes=\"(max-width: 585px) 100vw, 585px\" \/><\/p>\n<h2 data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\">Install &amp; configure Drupal Module :<\/h2>\n<p>We can download the kafka drupal module from the <a class=\"Hyperlink SCXP235856236 BCX8\" href=\"https:\/\/www.drupal.org\/project\/kafka\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"TextRun SCXP235856236 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP235856236 BCX8\">https:\/\/www.drupal.org\/project\/kafka<\/span><\/span><\/a><\/p>\n<p>Use composer to download the module<\/p>\n<p><span class=\"TextRun SCXP158800269 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP158800269 BCX8\">composer require &#8216;<\/span><\/span><span class=\"TextRun SCXP158800269 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"SpellingError SCXP158800269 BCX8\">drupal<\/span><\/span><span class=\"TextRun SCXP158800269 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP158800269 BCX8\">\/<\/span><\/span><span class=\"TextRun SCXP158800269 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"SpellingError SCXP158800269 BCX8\">kafka<\/span><\/span><span class=\"TextRun SCXP158800269 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-usefontface=\"false\" data-contrast=\"none\"><span class=\"NormalTextRun SCXP158800269 BCX8\">:^1.0@beta&#8217;<\/span><\/span><span class=\"EOP SCXP158800269 BCX8\">\u200b<\/span><\/p>\n<p>After download Enable the Module &amp; update below setting in settings.php file to connect to the kafka server<\/p>\n<pre>$settings['kafka'] = [\u200b\r\n'topic' =&gt; 'kafka-demo',\u200b\r\n'consumer' =&gt; [\u200b\r\n'brokers' =&gt; ['127.0.0.1:9092'],\u200b\r\n],\u200b\r\n'producer' =&gt; [\u200b\r\n'brokers' =&gt; ['127.0.0.1:9092'],\u200b\r\n],\u200b\r\n];<\/pre>\n<p>Now From the Drupal Menu you can view the Kafka Status Reports =&gt; Status report =&gt; Kafka<\/p>\n<p>It should be something like Below,<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-57659\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/Drupal-kafka-300x122.png\" alt=\"drupal-kafka\" width=\"885\" height=\"360\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/06\/Drupal-kafka-300x122.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Drupal-kafka-768x313.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Drupal-kafka-624x254.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/06\/Drupal-kafka.png 1024w\" sizes=\"(max-width: 885px) 100vw, 885px\" \/><\/p>\n<h2 data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\"><\/h2>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:4,&quot;335562767&quot;:0,&quot;335562768&quot;:4,&quot;335562769&quot;:0}\">That&#8217;s It,\u00a0 Congratulations !!<\/p>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>Apache Kafka is an open-source distributed event streaming platform. That uses Publish &amp; subscribe mechanism to stream the records.\u200b Download &amp; Installing the Apache Kafka: \u200bPrerequisite: You should have Java (JDK) installed on your Windows machine. Step -1: Download the binary version from the kafka official download page ( https:\/\/kafka.apache.org\/downloads ) Step -2: Unzip it [&hellip;]<\/p>\n","protected":false},"author":1509,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":235},"categories":[3602],"tags":[5263,4862,5262,1604],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/57660"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1509"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=57660"}],"version-history":[{"count":2,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/57660\/revisions"}],"predecessor-version":[{"id":57727,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/57660\/revisions\/57727"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=57660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=57660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=57660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}