concept Kafka server in category microservice

appears as: Kafka server, The Kafka server
Microservices Security in Action

This is an excerpt from Manning's book Microservices Security in Action.

Once ZooKeeper is up and running, we can start the Kafka server. Open a new tab on your command-line client and navigate to the kafka_home directory; then execute the following command:

\> bin/kafka-server-start.sh config/server.properties

Once the Kafka server is running, we can create our topic for publishing messages. Kafka, by default, comes with a utility tool that helps us to create topics easily. Open a new tab on your command-line client and navigate to the kafka_home directory as before. Let’s create our first topic by executing the following command. Note that we’ll use firsttopic as the name of the topic we’re creating:

Figure 9.5 The producer process puts events into the topic in the Kafka server. The consumer process receives the events.

Once these properties are set, save and close the file and start the Kafka server. The Kafka server is now ready to accept requests from clients who can authenticate themselves. If you attempt to run the microservices from section 9.5, those would fail because we’ve mandated client authentication on Kafka. The microservices from section 9.5 didn’t have mTLS configurations enabled, hence the failure.

The next step would be to configure the Order Processing and Buying History microservices to be able to authenticate themselves when connecting to the Kafka server. You can take a look at the code that’s related to the microservices in the chapter09/sample03 directory.