InfraMaxx

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.

Start with the first lesson

All 40 lessons

  1. 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…

  2. Message keyBeginner · 4 min

    Message key selects partition for related records.

  3. Consumer groupBeginner · 4 min

    Consumer group shares partitions among member consumers.

  4. OffsetBeginner · 4 min

    Offset identifies a log position within a partition.

  5. Replication factorBeginner · 4 min

    Replication factor sets number of partition replicas.

  6. acks allBeginner · 4 min

    acks all waits for acknowledgement according to in-sync replicas.

  7. ISRBeginner · 4 min

    ISR lists replicas sufficiently caught up.

  8. Unclean leader electionBeginner · 4 min

    Unclean leader election permits out-of-sync replica promotion.

  9. Idempotent producerBeginner · 4 min

    Idempotent producer deduplicates retried producer writes within a session.

  10. Transactional producerBeginner · 4 min

    Transactional producer coordinates writes and offsets for Kafka transactions.

  11. Consumer lagBeginner · 4 min

    Consumer lag measures distance between latest and committed offsets.

  12. Poison pillBeginner · 4 min

    Poison pill is a record consumers cannot process successfully.

  13. BatchingBeginner · 5 min

    Batching amortizes network cost across records.

  14. RetentionBeginner · 5 min

    Retention removes old logs by time or size policy.

  15. RebalanceBeginner · 5 min

    Rebalance reassigns partitions among consumer group members.

  16. Kafka partitionsBeginner · 4 min

    Kafka partitions provide ordered logs and units of assignment within a consumer group.

  17. 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…

  18. Producer acksIntermediate · 4 min

    Kafka producer acknowledgements and the in-sync replica threshold determine when writes can succeed.

  19. 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…

  20. 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…

  21. 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…

  22. 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…

  23. 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.

  24. 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.

  25. 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…

  26. 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…

  27. 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.

  28. 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.

  29. 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.

  30. 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.

  31. 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…

  32. 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…

  33. 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…

  34. 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.

  35. 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…

  36. 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…

  37. 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.

  38. 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…

  39. 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…

  40. 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…