4 ms·
Yes this is a fundamental problem with queues, message passing, streams or any pseudo push system. You must respect backpressure because if you don't queues bl
by agentgt 11y ago
Yes this is a fundamental problem with queues, message passing, streams or any pseudo push system.
You must respect backpressure because if you don't queues blow up and the only way to respect backpressure is to have the consumer request (ie pull) for more data. The trick is to make this a lazy async pull (reactive streams) and not a blocking pull (blocking queues) ie I'm ready for more data send it to me whenever.
RabbitMQ deals with this with ACKs, Prefetch count and heartbeats (as well as some other complicated techniques like TTL and queue length).