Skip to content
Repo for Kafka Udemy course
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Kafka Beginners Course

Source code from working through the Udemy Kafka course using F# instead of Java. Instructions for setting up a Kafka environment and an explanation of concepts can be found at

Environment set up

  1. Install .NET Core SDK. On Linux:

    $ wget -q
    $ sudo dpkg -i packages-microsoft-prod.deb
    $ sudo apt-get install apt-transport-https
    $ sudo apt-get update
    $ sudo apt-get install dotnet-sdk-2.2

    On Windows:

    > scoop install dotnet-sdk
  2. Install Kafka. See the accompanying blog post for instructions on installing Kafka locally using Helm.


  1. Clone the repo

    > git clone
    > cd kafka-beginners-course
  2. Install dependencies.

    > .paket/paket.exe install

    If you are using OSX or Linux you will need to install Mono.

  3. Restore the project.

    > dotnet restore
  4. Compile the application.

    > dotnet publish -o out

    This will compile the application and add the compiled assets into a directory called out.

  5. Start the consumer.

    > dotnet out/Tutorial.dll consumer kafka:9092 test_topic test_group

    This will start a consumer that will try to connect to a Kafka broker at kafka:9092 listening on the topic test_topic within the group test_group.

  6. Open a new terminal and start the producer.

    > dotnet out/Tutorial.dll producer kafka:9092 test_topic test_key

    This will start a producer that will try to connect to a Kafka broker at kafka:9092 producing to the topic test_topic using the key test_key.

If you type a message into the producer terminal then you should see the messages appear in the consumer terminal. See the accompanying blog post for a full walk through.


You can’t perform that action at this time.