Topics in Apache Kafka®

A topic is a way to group message streams into categories.

Producers publish a specific category of messages to a topic, while consumers subscribe to this topic and pull messages from it.

For each topic, Apache Kafka® keeps a message log that can be divided into several partitions.

For example, suppose the data producer is an online store. In that case, you can create separate topics for logging user actions, storing data about their shopping cart, keeping records about transactions, and so on.

Managed Service for Apache Kafka® manages storage of topic messages and enables:

  • Partition replication: provided that a cluster consists of at least two brokers, the replication factor set for topics is greater than one.

  • Message compaction.

  • Log purging under the policy when partition messages become outdated or the specified log size is reached.

For more information, see the official Apache Kafka® documentation .

See also