Brokers, delivery guarantees, ordering, idempotency, dead letters and event-driven design.
A logging agent reads lines from application log files and sends them to a queue, and a single consumer writes them into a search index. The agent can read lines much faster than the consumer can index them. In plain words, what is backpressure, and what would it look like in this
A Java service hands work from a reader thread to a writer thread through a bounded queue. Explain what each of these two calls does when the queue is already full, and which one gives you backpressure.
A teammate builds an image-processing service that keeps incoming jobs in an in-memory list with no size limit, "so we never have to reject anything". Why is an unbounded buffer like this risky?
Your team's dashboard shows the number of messages waiting in the
email-send queue. Over the last hour it has climbed steadily from
near zero to 80,000 and is still rising. What does that tell you about
producers and consumers, and what are the first things you would check?
A RabbitMQ worker sets its channel prefetch count to 10 before it starts consuming. What does that setting control, and how does it protect the worker from being flooded?
Kafka consumers call poll() to fetch records, while some other
brokers push messages to consumers as they arrive. Why does a
pull-based consumer get a form of backpressure almost for free?