How to Design a Distributed Messaging Queue

The commit log, partitions, replication, consumer groups, and exactly-once delivery behind Kafka, RabbitMQ, and SQS