Create a new EventQueue.
Maximum queue size (oldest events dropped when exceeded)
Get the current queue length.
Check if the queue is empty.
Get the maximum queue size.
Push an event to the queue. Non-blocking - returns immediately. If queue is at max size, oldest event is dropped.
Drain all events from the queue. Returns the events and clears the queue atomically. This is the primary consumption method for batch processing.
Peek at the next event without removing it.
Clear all events from the queue.
Generic Event Queue for async event processing.
Provides a non-blocking queue that producers can push to and consumers can drain in batches. Designed for decoupling event producers from consumers.
Example