Kafka 101

Learn about the fundamentals of Apache Kafka. This tutorial covers basic concepts of Kafka and its components.

What are producers?

Producers publish messages to a topic, which appends each message to the end of a partition. By default, if a message contains a key, the hashed value of the key is used to decide which partition receives the message. If the key is null, a round-robin algorithm balances the storage of messages across all partitions.

Kafka guarantees that as long as no new partitions are added, elements with the same key are stored in the same partition when using the default partitioner.

You can also implement a custom partitioning strategy to route messages to specific partitions using custom logic.

Previous resource
What are messages?
Next resource
What are consumers?