Track
Kafka, RabbitMQ & Queues lessons
40 short lessons on Kafka, RabbitMQ & Queues. Each one starts from a real situation, shows how it works, and ends with a quiz. Free to read.
All 40 lessons
- PartitionBeginner · 4 min
Kafka orders records within a partition, not across all partitions. Consumer group assignments distribute partitions among consumers; offsets represent positions in a…
- Message keyBeginner · 4 min
Message key selects partition for related records.
- Consumer groupBeginner · 4 min
Consumer group shares partitions among member consumers.
- OffsetBeginner · 4 min
Offset identifies a log position within a partition.
- Replication factorBeginner · 4 min
Replication factor sets number of partition replicas.
- acks allBeginner · 4 min
acks all waits for acknowledgement according to in-sync replicas.
- ISRBeginner · 4 min
ISR lists replicas sufficiently caught up.
- Unclean leader electionBeginner · 4 min
Unclean leader election permits out-of-sync replica promotion.
- Idempotent producerBeginner · 4 min
Idempotent producer deduplicates retried producer writes within a session.
- Transactional producerBeginner · 4 min
Transactional producer coordinates writes and offsets for Kafka transactions.
- Consumer lagBeginner · 4 min
Consumer lag measures distance between latest and committed offsets.
- Poison pillBeginner · 4 min
Poison pill is a record consumers cannot process successfully.
- BatchingBeginner · 5 min
Batching amortizes network cost across records.
- RetentionBeginner · 5 min
Retention removes old logs by time or size policy.
- RebalanceBeginner · 5 min
Rebalance reassigns partitions among consumer group members.
- Kafka partitionsBeginner · 4 min
Kafka partitions provide ordered logs and units of assignment within a consumer group.
- Partition orderingIntermediate · 4 min
Kafka orders records only inside one partition, and never across partitions. Records that must stay in order need the same key, because the key decides which partition…
- Producer acksIntermediate · 4 min
Kafka producer acknowledgements and the in-sync replica threshold determine when writes can succeed.
- Transactions in KafkaIntermediate · 4 min
Kafka transactions make writes to several partitions visible together or not at all. Consumers see that outcome only when they read with read_committed, and the design…
- Consumer groupsIntermediate · 4 min
A consumer group shares a topic's partitions among its members, while each group keeps its own committed offsets. Groups do not affect each other, so one topic can feed…
- Consumer rebalanceIntermediate · 4 min
A rebalance reassigns a group's partitions when members join, leave or time out. The eager protocol stops every partition, while the cooperative protocol moves only the…
- Offset commitsIntermediate · 4 min
A committed offset marks the work a consumer group is done with. Auto-commit commits on a timer, so the timing of the commit decides whether a crash repeats or skips…
- Exactly once boundariesIntermediate · 4 min
Kafka exactly-once covers the records and offsets written inside Kafka. A database write or an external call sits outside that commit, so it needs its own key or outbox.
- Retention and compactionIntermediate · 4 min
Delete retention removes old segments by time or size, while compaction keeps the latest record for each key. A state topic needs compaction if old keys must survive.
- ISR and high watermarkAdvanced · 4 min
The in-sync replica set holds the replicas that are caught up with the leader. The high watermark is the offset every in-sync replica has, and consumers read only up to…
- Min in sync replicasAdvanced · 4 min
The min.insync.replicas setting sets how many in-sync replicas a write with acks=all must reach. Paired with the replication factor, it decides whether one broker…
- Kafka lag metricsAdvanced · 4 min
Consumer lag is the gap between the newest message and the group's committed position on each partition, and it is the first number to read when delivery slows down.
- Dead letter queuesAdvanced · 4 min
A dead letter exchange catches messages that are rejected, expired, overflowed or redelivered too often, so failed work is kept for inspection instead of being lost.
- RabbitMQ exchangesAdvanced · 4 min
In RabbitMQ, publishers send to an exchange, and bindings decide which queues receive a copy, so a successful publish does not prove that any queue got the message.
- Direct routingAdvanced · 4 min
A direct exchange sends each message to queues whose binding key matches the routing key exactly, so a difference in case or spacing silently sends the message nowhere.
- Topic routingAdvanced · 4 min
A topic exchange routes by matching the words of a dotted routing key against patterns, where star matches one word and hash matches zero or more, so word count decides…
- Fanout routingAdvanced · 4 min
A fanout exchange copies every message to every bound queue and ignores the routing key, which suits events many services need in full, but each extra binding adds a…
- Quorum queuesAdvanced · 4 min
A quorum queue replicates each message to several nodes and commits it once a majority stores it, which keeps confirmed messages through a node failure at the cost of…
- Consumer acknowledgmentsAdvanced · 4 min
A manual ack tells the broker that a consumer finished the work, so until that ack arrives the broker holds the message and returns it to the queue if the consumer dies.
- Prefetch tuningAdvanced · 4 min
Prefetch sets how many unacknowledged messages each consumer may hold, where a large window favors throughput for quick uniform work and a small window spreads slow…
- Poison messagesAdvanced · 4 min
A poison message fails on every attempt, so a requeue loop turns one bad message into a blocked queue, and permanent errors should be rejected while a delivery limit…
- Retry delay queuesAdvanced · 4 min
A retry delay queue uses a TTL and a dead letter exchange to hold a failed message for a fixed wait, then return it to the work queue, so the consumer stays free.
- BackpressureAdvanced · 4 min
Backpressure slows publishers when queues cannot keep up, and a memory or disk alarm blocks every publisher on the node, so one burst can stall services that have…
- Outbox patternAdvanced · 4 min
The outbox pattern writes an event row in the same database transaction as the business change and relays it to the broker later, which closes the gap where a crash or…
- RabbitMQ exchanges: operational verificationAdvanced · 4 min
Verification compares the live exchanges, queues and bindings with the intended design and then checks alarms, which catches a deploy that reported success while one…