3 Exploring Kafka topics and messages

 

This chapter covers

  • Working with Kafka topics
  • How topics structure the flow of data in Kafka
  • Messages, the basic units of data in Kafka

In this chapter, we’ll delve into the foundational elements of Apache Kafka: topics and the intricacies of messages. Kafka topics are the channels through which data is organized and distributed, while messages are the individual units of data that flow through these channels. We’ll explore the various types of messages, their structures, and data formats, as well as understand how these elements contribute to efficient data streaming and processing. By the end of this chapter, you’ll have a comprehensive understanding of how to effectively manage Kafka topics and the detailed composition of Kafka messages.

3.1 Topics

Kafka topics are key to organizing data flow, much like tables in a database. They help manage different types and amounts of information in an orderly way. Complex data might be spread across multiple topics, so it’s important to manage them efficiently for smooth streaming and processing.

3.1.1 Viewing topics

3.1.2 Create, customize, and delete topics

3.2 Messages

3.2.1 Message types

3.2.2 Data formats

3.2.3 Message structure

Summary