advancedEvent-Driven Architecture with Kafka
What's the fundamental difference between a service calling another service's REST API vs publishing a Kafka event?
A REST call is synchronous and tightly coupled — the caller needs the callee to be up right now and waits for a response, and adding a new consumer means changing the producer's code to call it too. Publishing a Kafka event decouples them completely: the producer doesn't know or care who's listening, new consumers can be added later with zero changes to the producer, and if a consumer is temporarily down, the event just waits in the topic.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.
What's the fundamental difference between a service calling another service's REST API vs publishing a Kafka event?