Synchronous communication requires the caller to wait for an immediate response before continuing, while asynchronous communication lets the caller proceed without waiting for the receiver to act.
A checkout flow might synchronously call a Payment service via REST because it needs to know immediately if the charge succeeded, but asynchronously publish an OrderPlaced event to Kafka for the Notification service, which can send the confirmation email a few seconds later without the customer waiting on it.
@Service
public class CheckoutService {
private final RestClient paymentClient;
private final KafkaTemplate<String, OrderPlaced> kafka;
public CheckoutService(RestClient.Builder builder, KafkaTemplate<String, OrderPlaced> kafka) {
this.paymentClient = builder.baseUrl("http://payment-service").build();
this.kafka = kafka;
}
public void checkout(Order order) {
// Synchronous: we must know the result before continuing
PaymentResult result = paymentClient.post()
.uri("/payments")
.body(new PaymentRequest(order.id(), order.total()))
.retrieve()
.body(PaymentResult.class);
if (result.approved()) {
// Asynchronous: email, shipping and analytics react later, on their own
kafka.send("orders", order.id(), new OrderPlaced(order.id(), order.total()));
}
}
}A concise interview answer is
Synchronous communication blocks the caller until it gets a response, like a REST call, and works well when the caller genuinely needs the result to continue. Asynchronous communication, like publishing to a queue, lets the caller move on immediately, which improves resilience and throughput for anything that doesn't need an instant answer.
Last updated: 11 November 2026
Previous question: How do microservices communicate with each other?
Next question: Can you explain the role of message brokers in microservices?