messaging
In-Memory Queue
FIFO queue — producers enqueue at the tail, consumers dequeue from the head in strict order
Queue Depth0
Produced0
Consumed0
// queue (FIFO — head on left, tail on right)
Consumer ←
empty
→ Producer
// processed (last 12)
none yet
// event log
No events yet.
// how it works
- Producer appends to tail — O(1)
- Consumer removes from head — O(1)
- Strict FIFO: first in, first out
- Decouples producer/consumer speeds
// trade-offs
- Simple, low-latency in-process communication
- Bounded queues provide backpressure
- Data lost on process crash (volatile)
- Single consumer — no parallelism