Durable queues:
- This is a disk-backed queue for persisting the messages.
- The tasks are served in a FIFO manner.
- Durable queues append serialized messages to a fixed-sized file called `LogSegment`.
- The durable queues also append queue operations to an `IndexSegment`.
- The index segment serves as both a :
- [Bitcask](https://riak.com/assets/bitcask-intro.pdf) index for storing the messages offsets
- A WAL file: it is a Log where we append message status after each queue operation (ready, delivered, acked, and failed) and an offset to the message in one of the `LogSegments`. At init time, we just scan this file to rebuild the in-memory data structure.
Consumers
- Implement an acking mechanism for consumers.
- Changes the consumer `join()` to wait for the queue to be empty before canceling the consumers.