Event Driven Architecture — Series Part I — Create a kafka lab in WSL2
[Last Updated : 07 of January of 2023]
Nowadays the use of event-driven architectures sounds a lot in all professional environment. This makes me wonder how to learn to solve their integration in the design of solutions and architecture proposal.
Designing solutions and architectures involves knowing what you have in your hands, and getting down to work by preparing a laboratory where you can start experimenting.
This basics config are create in a windows 10 machine with WSL2, due the use of Windows Linux Subsytem can be ideal for this type of labs, it does not mess up your windows environment and you work in this case on ubuntu 20.4 under command line, which gives simplicity and ease of use.
Prerequisites and necessary tools.
It is necessary to have the following items pre-installed and configured before installing Kafka
- WSL installed on and configured on your Windows.
- curl, for kakfa download.
- Java 8 or higher, as a specific prerequisite, to run kafka :
Tips: It is a minimum requirement to have Java jdk8 installed at least and to have it configured in the ~/ect/environment file. For example in the case of jdk 11, the path that must be reflected in kacfka must be JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
- Nano as a text editor to prepare the configuration files. Nano is installed by default on most Linux distributions
- Windows terminal, as an ideal tool to manage the different sessions of your distribution installed on WSL2 Windows terminal
kafka has several distributions to work with it, we use in this case the latest version and the open source distribution for installation, due without containers, for ease of use and for its reduced consumption to be able to mount a basic environment of a fast way.
Note :In case you want to work with containers, a recommended commercial distribution, to set up your own laboratory, could be Confluent.