<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jim Galasyn</title>
    <description>The latest articles on DEV Community by Jim Galasyn (@jimgalasyn).</description>
    <link>https://dev.to/jimgalasyn</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F555722%2F8099cb47-0746-437c-85f4-a255027105b7.jpeg</url>
      <title>DEV Community: Jim Galasyn</title>
      <link>https://dev.to/jimgalasyn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jimgalasyn"/>
    <language>en</language>
    <item>
      <title>How to Run Apache Kafka on Windows</title>
      <dc:creator>Jim Galasyn</dc:creator>
      <pubDate>Fri, 08 Jan 2021 02:27:48 +0000</pubDate>
      <link>https://dev.to/confluentinc/how-to-run-apache-kafka-on-windows-362b</link>
      <guid>https://dev.to/confluentinc/how-to-run-apache-kafka-on-windows-362b</guid>
      <description>&lt;p&gt;Is Windows your favorite development environment? Do you want to run Apache Kafka&lt;sup&gt;®&lt;/sup&gt; on Windows? Thanks to the Windows Subsystem for Linux 2 (WSL 2), now you can, and with fewer tears than in the past. Windows still isn’t the recommended platform for running Kafka with production workloads, but for trying out Kafka, it works just fine. Let’s take a look at how it’s done.&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
Set up your environment
&lt;ul&gt;
    &lt;li&gt;
Install WSL 2
&lt;ul&gt;
    &lt;li&gt;Enable the Windows Subsystem for Linux&lt;/li&gt;
    &lt;li&gt;Enable the Virtual Machine feature&lt;/li&gt;
    &lt;li&gt;Get the Linux kernel update&lt;/li&gt;
    &lt;li&gt;Set the default WSL version&lt;/li&gt;
    &lt;li&gt;Install your preferred Linux distribution&lt;/li&gt;
&lt;/ul&gt;




&lt;/li&gt;

    &lt;li&gt;Install Java&lt;/li&gt;

    &lt;li&gt;Download Kafka&lt;/li&gt;

    &lt;li&gt;Start the Kafka cluster&lt;/li&gt;

    &lt;li&gt;Produce and consume some messages&lt;/li&gt;

    &lt;li&gt;Stop Kafka&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

    &lt;li&gt;Kafka and Windows: The good, the bad, and the ugly&lt;/li&gt;

    &lt;li&gt;You’re just getting started!&lt;/li&gt;

    &lt;li&gt;Kafka on Windows? What made this possible?&lt;/li&gt;

&lt;/ul&gt;

&lt;h2 id="set-up"&gt;
&lt;a id="set-up"&gt;&lt;/a&gt;Set up your environment&lt;/h2&gt;

&lt;h3 id="install-wsl-2"&gt;
&lt;a id="install-wsl-2"&gt;&lt;/a&gt;Install WSL 2&lt;/h3&gt;

&lt;p&gt;The Windows Subsystem for Linux 2 makes it all possible. &lt;a href="https://docs.microsoft.com/en-us/windows/wsl/about" rel="noopener noreferrer"&gt;Microsoft describes WSL 2&lt;/a&gt; as “a GNU/Linux environment—including most command line tools, utilities, and applications—directly on Windows, unmodified, without the overhead of a traditional virtual machine or dual boot setup.”&lt;/p&gt;

&lt;p&gt;Make sure you’re running Windows 10, version 1903.18362 or higher. Click &lt;strong&gt;Start&lt;/strong&gt; and navigate to &lt;strong&gt;Settings &amp;gt; System &amp;gt; About&lt;/strong&gt;. In the “Windows specifications” section, find the “OS build.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oNJtW0Ud--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.confluent.io/wp-content/uploads/window-specifications.png" class="article-body-image-wrapper"&gt;&lt;img class="aligncenter wp-image-28883 size-full" src="https://res.cloudinary.com/practicaldev/image/fetch/s--oNJtW0Ud--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.confluent.io/wp-content/uploads/window-specifications.png" alt="Windows specifications | Windows 10 Enterprise" width="942" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’re on the Windows Update train, you probably have the latest version and are good to go. If not, you need to &lt;a href="https://support.microsoft.com/en-us/help/4027667/windows-10-update" rel="noopener noreferrer"&gt;update Windows 10&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When you’re sure that Windows is up to date, follow these instructions below to install WSL 2.&lt;/p&gt;

&lt;h4 id="enable-windows-subsystem"&gt;
&lt;a id="enable-windows-subsystem"&gt;&lt;/a&gt;Enable the Windows Subsystem for Linux&lt;/h4&gt;

&lt;p&gt;Turn on the Windows Subsystem for Linux feature before installing a Linux distribution. Open PowerShell as an administrator, and run the following command:&lt;/p&gt;

&lt;pre&gt;dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart&lt;/pre&gt;

&lt;p&gt;This may take a minute or two. Your output should resemble the following:&lt;/p&gt;

&lt;pre&gt;Deployment Image Servicing and Management tool
Version: 10.0.18362.1139

Image Version: 10.0.18363.1139

Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
&lt;/pre&gt;

&lt;h4 id="enable-virtual-machine"&gt;
&lt;a id="enable-virtual-machine"&gt;&lt;/a&gt;Enable the Virtual Machine feature&lt;/h4&gt;

&lt;p&gt;WSL 2 requires the Virtual Machine Platform feature. In PowerShell, run the following command:&lt;/p&gt;

&lt;pre&gt;dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart&lt;/pre&gt;

&lt;h4 id="linux-kernel-update"&gt;
&lt;a id="linux-kernel-update"&gt;&lt;/a&gt;Get the Linux kernel update&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi" rel="noopener noreferrer"&gt;Download the Linux kernel update package&lt;/a&gt;, which is a regular Windows Installer (.msi) file.&lt;/p&gt;

&lt;p&gt;Double-click the .msi file to install the WSL 2 update. If you’re prompted for elevated permissions, select &lt;strong&gt;Yes&lt;/strong&gt; to approve the installation.&lt;/p&gt;

&lt;h4 id="set-default"&gt;
&lt;a id="set-default"&gt;&lt;/a&gt;Set the default WSL version&lt;/h4&gt;

&lt;p&gt;In PowerShell, run the following command to set WSL 2 as the default version for your Linux distributions:&lt;/p&gt;

&lt;pre&gt;wsl --set-default-version 2
&lt;/pre&gt;

&lt;p&gt;Your output should resemble the following:&lt;/p&gt;

&lt;pre&gt;For information on key differences with WSL 2 please visit https://aka.ms/wsl2&lt;/pre&gt;

&lt;p&gt;WSL 2 is ready to use. For more information on installing WSL 2, including troubleshooting, see &lt;a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10" rel="noopener noreferrer"&gt;Windows Subsystem for Linux Installation Guide for Windows 10&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id="install-linux"&gt;
&lt;a id="install-linux"&gt;&lt;/a&gt;Install your preferred Linux distribution&lt;/h3&gt;

&lt;p&gt;Install Linux from the Microsoft Store, the same way you install other applications on Windows.&lt;/p&gt;

&lt;p&gt;Open the Microsoft Store app and search for “Linux.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--L6cNC-E5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.confluent.io/wp-content/uploads/linux.png" class="article-body-image-wrapper"&gt;&lt;img class="aligncenter wp-image-28884 " src="https://res.cloudinary.com/practicaldev/image/fetch/s--L6cNC-E5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.confluent.io/wp-content/uploads/linux.png" alt="Linux | Home: Ubuntu 20.04 LTS Installed" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This blog post uses Ubuntu 20.04. Select &lt;strong&gt;Ubuntu 20.04 LTS&lt;/strong&gt; and click &lt;strong&gt;Install&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When the installation is complete, click &lt;strong&gt;Launch&lt;/strong&gt;. The shell opens and displays the following message:&lt;/p&gt;

&lt;pre&gt;Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username:
&lt;/pre&gt;

&lt;p&gt;Enter a username and password to complete the installation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cqxfH3gb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.confluent.io/wp-content/uploads/installing.png" class="article-body-image-wrapper"&gt;&lt;img class="aligncenter wp-image-28885 " src="https://res.cloudinary.com/practicaldev/image/fetch/s--cqxfH3gb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.confluent.io/wp-content/uploads/installing.png" alt="UNIX user account" width="800" height="647"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3 id="install-java"&gt;
&lt;a id="install-java"&gt;&lt;/a&gt;Install Java&lt;/h3&gt;

&lt;p&gt;Run the package manager to get the latest updates. In the Ubuntu shell window that opened above, run the following commands:&lt;/p&gt;

&lt;pre&gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade -y&lt;/pre&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ℹ️&lt;/td&gt;
&lt;td&gt;Tip: Right-click pastes text into the terminal window.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Kafka requires the Java runtime to be version 8 or higher. Check the Java version in your Linux installation:&lt;/p&gt;

&lt;pre&gt;java -version&lt;/pre&gt;

&lt;p&gt;Your output should resemble this:&lt;/p&gt;

&lt;pre&gt;openjdk version "1.8.0_265"
OpenJDK Runtime Environment (build 1.8.0_265-8u265-b01-0ubuntu2~20.04-b01)
OpenJDK 64-Bit Server VM (build 25.265-b01, mixed mode)
&lt;/pre&gt;

&lt;p&gt;If Java isn’t installed (likely) or it’s not the right version, install it by using your distribution’s package manager. There are a lot of ways to install Java. On Ubuntu, this is one of the simplest:&lt;/p&gt;

&lt;pre&gt;sudo apt install openjdk-8-jdk -y&lt;/pre&gt;

&lt;h3 id="download-kafka"&gt;
&lt;a id="download-kafka"&gt;&lt;/a&gt;Download Kafka&lt;/h3&gt;

&lt;p&gt;You can install Kafka by using a package manager, or you can download the tarball and extract it to your local machine directly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.apache.org/dyn/closer.cgi?path=/kafka/2.6.0/kafka_2.13-2.6.0.tgz" rel="noopener noreferrer"&gt;Select a mirror from the Kafka download site&lt;/a&gt; and download the tarball. The following command downloads Apache Kafka version 2.6:&lt;/p&gt;

&lt;pre&gt;wget https://ftp.wayne.edu/apache/kafka/2.6.0/kafka_2.13-2.6.0.tgz&lt;/pre&gt;

&lt;p&gt;Run the following commands to untar the Kafka archive, and &lt;code&gt;cd&lt;/code&gt; to the &lt;code&gt;kafka&lt;/code&gt; directory:&lt;/p&gt;

&lt;pre&gt;tar -xzf kafka_2.13-2.6.0.tgz
cd kafka_2.13-2.6.0
&lt;/pre&gt;

&lt;p&gt;Run the &lt;code&gt;ls -al&lt;/code&gt; command to list the contents of the &lt;code&gt;kafka&lt;/code&gt; directory:&lt;/p&gt;

&lt;pre&gt;total 64
drwxr-xr-x  7 jim jim  4096 Oct 14 12:27 ./
drwxr-xr-x 25 jim jim  4096 Nov 20 12:52 ../
-rw-r--r--  1 jim jim 29975 Jul 28 11:16 LICENSE
-rw-r--r--  1 jim jim   337 Jul 28 11:16 NOTICE
drwxr-xr-x  3 jim jim  4096 Jul 28 11:23 bin/
drwxr-xr-x  2 jim jim  4096 Jul 28 11:23 config/
drwxr-xr-x  2 jim jim  4096 Oct 14 12:26 libs/
drwxr-xr-x  2 jim jim  4096 Oct 14 12:28 logs/
drwxr-xr-x  2 jim jim  4096 Jul 28 11:23 site-docs/
&lt;/pre&gt;

&lt;h3 id="start-kafka-cluster"&gt;
&lt;a id="start-kafka-cluster"&gt;&lt;/a&gt;Start the Kafka cluster&lt;/h3&gt;

&lt;p&gt;Run the following command to start ZooKeeper:&lt;/p&gt;

&lt;pre&gt;bin/zookeeper-server-start.sh config/zookeeper.properties
&lt;/pre&gt;

&lt;p&gt;There will be a lot of output, and ZooKeeper will be ready in a short time, typically around a second or two.&lt;/p&gt;

&lt;p&gt;Open another terminal session. Change the directory to the &lt;code&gt;kafka&lt;/code&gt; directory, and start the Kafka broker:&lt;/p&gt;

&lt;pre&gt;cd kafka_2.13-2.6.0
bin/kafka-server-start.sh config/server.properties
&lt;/pre&gt;

&lt;p&gt;If you arrange the windows to be side by side, your output should resemble the following screenshot:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Tt2r8Gvt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.confluent.io/wp-content/uploads/output-windows.png" class="article-body-image-wrapper"&gt;&lt;img class="aligncenter wp-image-28886 size-full" src="https://res.cloudinary.com/practicaldev/image/fetch/s--Tt2r8Gvt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.confluent.io/wp-content/uploads/output-windows.png" alt="Output | Windows" width="1000" height="638"&gt;&lt;/a&gt;&lt;span class="image-caption"&gt;ZooKeeper (left) and a Kafka broker (right) on Ubuntu 20.04 running on Windows and WSL 2&lt;/span&gt;&lt;/p&gt;

&lt;h3&gt;
&lt;a id="produce-and-consume"&gt;&lt;/a&gt;Produce and consume some messages&lt;/h3&gt;

&lt;p&gt;Open another terminal session and run the &lt;code&gt;kafka-topics&lt;/code&gt; command to create a Kafka topic named &lt;code&gt;quickstart-events&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;cd kafka_2.13-2.6.0
bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:9092
&lt;/pre&gt;

&lt;p&gt;Your output should resemble this:&lt;/p&gt;

&lt;pre&gt;first event
second event
third event
&lt;/pre&gt;

&lt;p&gt;Arrange the producer and consumer terminal windows to be side by side. In the producer terminal, type a few more messages, and watch as they appear in the consumer terminal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R1cQbIQN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.confluent.io/wp-content/uploads/kafka-windows-produce-consume.gif" class="article-body-image-wrapper"&gt;&lt;img class=" wp-image-28888 aligncenter" src="https://res.cloudinary.com/practicaldev/image/fetch/s--R1cQbIQN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.confluent.io/wp-content/uploads/kafka-windows-produce-consume.gif" alt="Produce | Consume" width="893" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3 id="stop-kafka"&gt;
&lt;a id="stop-kafka"&gt;&lt;/a&gt;Stop Kafka&lt;/h3&gt;

&lt;p&gt;When you’re done experimenting with Kafka, follow these steps to exit the Kafka environment:&lt;/p&gt;

&lt;ol&gt;
    &lt;li&gt;Stop the consumer and producer clients with Ctrl+C&lt;/li&gt;
    &lt;li&gt;Stop the Kafka broker with Ctrl+C&lt;/li&gt;
    &lt;li&gt;Stop the ZooKeeper server with Ctrl+C&lt;/li&gt;
    &lt;li&gt;Run the following command to clean up:
&lt;code&gt;rm -rf /tmp/kafka-logs /tmp/zookeeper&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id="kafka-and-windows"&gt;
&lt;a id="kafka-and-windows"&gt;&lt;/a&gt;Kafka and Windows: The good, the bad, and the ugly&lt;/h2&gt;

&lt;p&gt;There are lots of Kafka-on-Windows tutorials, but most make the mistake of running Kafka directly on the JVM on Windows. Superficially, this appears to work, but there are limitations: Kafka uses specific features of POSIX to achieve high performance, so emulations—which happen on WSL 1—are insufficient. For example, the broker will crash when it rolls a segment file. Always run Kafka on Windows in a Linux environment backed by WSL 2.&lt;/p&gt;

&lt;p&gt;Another approach that works well is to run Kafka in Docker containers. &lt;a href="https://docs.docker.com/docker-for-windows/install/" rel="noopener noreferrer"&gt;Docker Desktop for Windows&lt;/a&gt; has been updated to use the WSL 2 back end, so Docker works exactly as it does on native Linux, without needing to spin up an entire VM. If you want to give this approach a go, &lt;a href="https://docs.confluent.io/platform/current/quickstart/ce-docker-quickstart.html?utm_source=dev&amp;amp;utm_medium=blogpost&amp;amp;utm_campaign=tm.devx_ch.how-to-run-kafka-on-windows_content.apache-kafka" rel="noopener noreferrer"&gt;try it out using the Confluent Platform demo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dD9lduMD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.confluent.io/wp-content/uploads/ubuntu.png" class="article-body-image-wrapper"&gt;&lt;img class="aligncenter wp-image-28882" src="https://res.cloudinary.com/practicaldev/image/fetch/s--dD9lduMD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.confluent.io/wp-content/uploads/ubuntu.png" alt="Ubuntu 20.04 LTS" width="821" height="399"&gt;&lt;/a&gt;&lt;span class="image-caption"&gt;Apache Kafka and Confluent Platform running in Docker containers on Ubuntu 20.04 on Windows and WSL 2&lt;/span&gt;&lt;/p&gt;

&lt;h2 id="getting-started"&gt;
&lt;a id="getting-started"&gt;&lt;/a&gt;You’re just getting started!&lt;/h2&gt;

&lt;p&gt;Although Kafka provides an event streaming platform to build your applications on, you’ll want to take advantage of the broader ecosystem of components—like &lt;a href="https://ksqldb.io/?utm_source=dev&amp;amp;utm_medium=blogpost&amp;amp;utm_campaign=tm.devx_ch.how-to-run-kafka-on-windows_content.apache-kafka" rel="noopener noreferrer"&gt;ksqlDB&lt;/a&gt;, &lt;a href="https://www.confluent.io/product/confluent-platform/data-compatibility?utm_source=dev&amp;amp;utm_medium=blogpost&amp;amp;utm_campaign=tm.devx_ch.how-to-run-kafka-on-windows_content.apache-kafka" rel="noopener noreferrer"&gt;Confluent Schema Registry&lt;/a&gt;, and &lt;a href="https://docs.confluent.io/platform/current/control-center/index.html?utm_source=dev&amp;amp;utm_medium=blogpost&amp;amp;utm_campaign=tm.devx_ch.how-to-run-kafka-on-windows_content.apache-kafka" rel="noopener noreferrer"&gt;Confluent Control Center&lt;/a&gt;—all provided as part of &lt;a href="https://docs.confluent.io/platform/current/platform.html?utm_source=dev&amp;amp;utm_medium=blogpost&amp;amp;utm_campaign=tm.devx_ch.how-to-run-kafka-on-windows_content.apache-kafka" rel="noopener noreferrer"&gt;Confluent Platform&lt;/a&gt;. At the moment, Confluent Platform is supported for development only on Windows, not for production environments.&lt;/p&gt;

&lt;p&gt;Now that you have Kafka installed, you’ll want to &lt;a href="https://kafka-tutorials.confluent.io/?utm_source=dev&amp;amp;utm_medium=blogpost&amp;amp;utm_campaign=tm.devx_ch.how-to-run-kafka-on-windows_content.apache-kafka" rel="noopener noreferrer"&gt;try out some tutorials&lt;/a&gt; and &lt;a href="https://events.confluent.io/meetups?utm_source=dev&amp;amp;utm_medium=blogpost&amp;amp;utm_campaign=tm.devx_ch.how-to-run-kafka-on-windows_content.apache-kafka" rel="noopener noreferrer"&gt;join in the community&lt;/a&gt;! Don’t forget that Apache Kafka has many APIs—including the producer and consumer but also &lt;a href="https://docs.confluent.io/platform/current/streams/index.html?utm_source=dev&amp;amp;utm_medium=blogpost&amp;amp;utm_campaign=tm.devx_ch.how-to-run-kafka-on-windows_content.apache-kafka" rel="noopener noreferrer"&gt;Kafka Streams&lt;/a&gt; and &lt;a href="https://docs.confluent.io/platform/current/connect/index.html?utm_source=dev&amp;amp;utm_medium=blogpost&amp;amp;utm_campaign=tm.devx_ch.how-to-run-kafka-on-windows_content.apache-kafka" rel="noopener noreferrer"&gt;Kafka Connect&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;To learn more, check out &lt;a href="https://developer.confluent.io/?utm_source=dev&amp;amp;utm_medium=blogpost&amp;amp;utm_campaign=tm.devx_ch.how-to-run-kafka-on-windows_content.apache-kafka"&gt;Confluent Developer&lt;/a&gt;.&lt;/b&gt;&lt;/p&gt;




&lt;h2 id="kafka-on-windows"&gt;
&lt;a id="kafka-on-windows"&gt;&lt;/a&gt;&lt;em&gt;Kafka on Windows? What made this possible?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;You may recall a time when Linux was anathema to Microsoft. Back in 2001, Microsoft CEO Steve Ballmer famously called Linux a “malignant cancer,” &lt;a href="https://www.zdnet.com/article/ballmer-i-may-have-called-linux-a-cancer-but-now-i-love-it/" rel="noopener noreferrer"&gt;but he has since come around&lt;/a&gt; to “loving” it. Microsoft’s current CEO Satya Nadella seems intent on making it a first-class citizen in the Microsoft ecosystem, which means that a new era has arrived for software developers on the Windows platform.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When the Windows Subsystem for Linux (WSL 1) was released in 2016, it became possible to run a real Linux dev environment in a Linux shell, while retaining the familiar Windows UX around the shell. Even File Explorer was integrated nicely with the Linux file system.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The big drawbacks are that WSL 1 emulates a Linux kernel, and it runs in a full VM. The first means processes that require a native kernel, like Docker, can’t run. The second means that WSL 1 consumes a lot of resources. WSL 1 was not sufficient to run Kafka reliably.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;But Microsoft delivered WSL 2 in 2019, and it’s a whole new world. They fixed the two biggest limitations, so WSL 2 runs a real Linux kernel, and the kernel runs on a subset of Hyper-V features, not in a full VM. For details, see &lt;a href="https://docs.microsoft.com/en-us/windows/wsl/compare-versions" rel="noopener noreferrer"&gt;Comparing WSL 1 and WSL 2&lt;/a&gt;. Now the path is clear for devs to build Kafka and ksqlDB apps on Windows.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>apachekafka</category>
      <category>opensource</category>
      <category>linux</category>
      <category>windows</category>
    </item>
  </channel>
</rss>
