O'Reilly logo

Microservices Deployment Cookbook by Vikram Murugesan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Kafka topics to stream data

In the previous recipe, we orchestrated our Kafka broker. The next step is obviously putting Kafka to action. In order to do that, we need some topics to work with. In this recipe, we will create some topics and will also learn how to produce and consume messages. Exchanging messages can be done in two ways: scripts and Java programs. We will be learning the Java way.

Getting ready

In this recipe, we will be using the same Kafka topics script to create topics:

  1. Open a new terminal shell and navigate to the directory where you have Kafka installed.
  2. Let's create a new topic called geolocations. We will then write a basic standalone producer program that will produce geolocations for this topic. We will integrate a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required