- Topic
- A stream of messages of a particular type: producers publish to a topic and consumers subscribe to one or more topics. A topic is divided into partitions that are distributed across the brokers of a cluster.
- Partition
- One slice of a topic, stored on a broker as a single logical log with a total order. It is Kafka's smallest unit of parallelism - at any time all messages from one partition are consumed by exactly one consumer within each consumer group.
- Broker
- A server that stores published messages; a Kafka cluster is many brokers, each holding one or more partitions. In this paper a broker keeps no per-consumer state and no replicas of another broker's data.
- Offset
- The logical position of a message within its partition's log, used in place of an explicit message id. Offsets increase but are not consecutive: the next offset is the current one plus the length of the current message.
- Segment file
- The physical unit of a partition's log, a file of approximately fixed size such as 1GB. Publishing appends to the last segment, retention deletes whole segments from the front, and the broker's in-memory index records the first offset of every segment.
- Message set
- A batch of messages carried in one publish request or returned in one pull response, typically hundreds of kilobytes on the consumer side. Batching amortizes the RPC and TCP/IP roundtrip cost that JMS-style per-message publishing cannot avoid.
- Consumer group
- One or more consumers that jointly consume a set of subscribed topics, with each message delivered to only one member of the group. Different groups each independently consume the full stream and need no coordination between them, which is how one topic serves both point-to-point and publish/subscribe.
- Rebalance
- The decentralized reassignment of partitions to consumers, triggered by a ZooKeeper watcher when brokers or consumers appear or disappear. Every consumer independently sorts the partition and consumer sets, claims a contiguous range, and resumes from the offset held in the offset registry.
- At-least-once delivery
- Kafka's only stated guarantee: every message reaches each consumer group at least once, but an unclean consumer crash can cause duplicates after the last offset committed to ZooKeeper. Applications that care must de-duplicate using offsets or a unique key, which the authors argue is cheaper than two-phase commit.