Build a Message Queue (RabbitMQ / SQS) (14 scenes)
Scene 03 · The queue — head, tail, enqueue, dequeue
Tail on the right where producers push, head on the left where consumers pull, and the FIFO order between them.
Previously

We named the rule — reads delete, broker tracks state. Now we draw the strip properly: tail on the right where producers push, head on the left where consumers pull, and the FIFO order between them.

Scene 03
The queue — head, tail, enqueue, dequeue
Diagram
One strip lives inside the broker. Producers push new messages onto the tail (right edge); consumers pull the oldest message off the head (left edge). Order is a property of the strip itself, not of who reads or writes.
BROKERheadtailProducerproducerenqueueConsumerconsumerdequeuedepth = 0
The producer pushes a new cell onto the tail every beat. After a few cells land, the consumer starts pulling cells off the head — in the same order they were enqueued.