Interview questions
Question 153 of 254
FreeWhy would a Spring Boot application use a message broker like Kafka or RabbitMQ instead of calling another service directly over HTTP?
Messaging
Direct synchronous HTTP calls couple services tightly — the caller blocks until the callee responds, and if the callee is down, the call fails immediately. A message broker decouples producer and consumer in both time and availability: the producer publishes a message and moves on immediately, the broker durably holds it, and the consumer processes it whenever it's able to — enabling asynchronous processing, buffering against traffic spikes, and resilience to a temporarily unavailable consumer.
Intermediate5 min

