4 ms·
Topically in an MC queue, a consumer "consumes" an element and won't be available for other consumers. For example a job queue. Also typically queues either gro
by gpderetta 3y ago
Topically in an MC queue, a consumer "consumes" an element and won't be available for other consumers. For example a job queue. Also typically queues either grow unbounded or pushes fail.
So no, I wouldn't say that the disruptor is a normal SPMC or MPMC queue as it semantics are different.
But yes, it has pretty much the same characteristics of UDP.
- mgaunard 3y agoI see what you mean. I would never use a pattern where you don't broadcast to all consumers myself. And while you can fail to produce when a consumer is too slow, I'd argue that sort of pattern only makes sense for a single consumer as well (the network equivalent would be TCP, which by definition can only be unicast).
- gpderetta 3y agoWell, TCP is stream oriented and unicast, but doesn't take much to conceive a message oriented protocol that does anycasting. As a real world example of anycasting queue that I'm sure you have used, consider the queue behind accept(2) or pthread_condition_wait.