Quick revision
The short answer
Event notification sends a thin fact, an id, a type and a time, and each consumer calls back for the data; here that means 16 million extra API calls a day, a callback race, and the customer service on every consumer's critical path. Event-carried state transfer puts the state consumers need into the event, so they keep a local copy and keep working when the customer service is down, at the cost of bigger payloads, a wider contract and copied personal data. A command is a request addressed to one owner who may refuse it. Here we should move to event-carried state: a versioned customer snapshot keyed by customer id, with only the fields consumers need.
What to remember
In this answer, we saw that event notification sends a thin fact and makes every consumer call back, which here costs 16 million calls a day, puts the customer service on every critical path and creates a race where callbacks return newer state than the event. Event-carried state transfer puts the needed state in the event, so consumers keep local copies and stay independent, at the cost of larger payloads, a wider contract and copied personal data. Commands are requests to one owner and belong on their own topics. For this case, a versioned customer snapshot keyed by customer id is the right choice.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
Event notification sends a thin fact, an id, a type and a time, and each consumer calls back for the data; here that means 16 million extra API calls a day, a callback race, and the customer service on every consumer's critical path. Event-carried state transfer puts the state consumers need into the event, so they keep a local copy and keep working when the customer service is down, at the cost of bigger payloads, a wider contract and copied personal data. A command is a request addressed to one owner who may refuse it. Here we should move to event-carried state: a versioned customer snapshot keyed by customer id, with only the fields consumers need.
Why this question is asked
These three terms describe the most basic choice in event-driven design: what goes into a message and what it means. The scenario in the overview is very common: a team starts with thin events because they are easy, and a year later the source service is drowning in callbacks. Interviewers ask this to see whether we can name the styles, reason about their costs with numbers, and recognise the subtle race that callbacks create. In this answer, we will define each style, measure the cost of the current design, see why callbacks race, look at the costs of carrying state, and finish with a recommendation.
1A Quick Recap of the Three Message Styles
An event is a fact about something that already happened, named in the past tense: CustomerUpdated, OrderPlaced. The producer publishes it and does not expect any particular service to act on it; any number of consumers may react, or none. A command is a request for something to happen, named as an instruction: ChargeCard, SendEmail. It is addressed to one owner, who may accept or refuse it, and the sender usually cares about the outcome.
Events then come in two main flavours. Event notification carries just enough to say that something changed: the customer id, the event type and a timestamp. Event-carried state transfer carries the state itself, often a full snapshot of the entity after the change, so consumers do not need to ask for it.
| Style | Carries | Consumer must | Example |
|---|---|---|---|
| Event notification | id, type, time | call back for data | CustomerUpdated {id} |
| Event-carried state | new state snapshot | store and use it | CustomerUpdated {id, name, tier, v7} |
| Command | a request to one owner | do it or refuse | SendEmail {to, template} |
2What Thin Events Cost Here
With event notification, each of the eight consumers calls the customer REST API for every event. At 2 million events a day, that is 8 x 2,000,000 = 16 million extra calls a day, about 185 per second on average and several times that at peak. The customer service must be sized for this load, which has nothing to do with its own users.
Worse, the customer service is now on every consumer's critical path. If it is slow or down for ten minutes, all eight consumers stop making progress, or fail and retry, adding more load to a service that is already struggling. The events were meant to decouple the services, and the callbacks couple them again.
3Why Callbacks Race
There is a subtler problem. Suppose customer 42 changes their address at 10:00:00 and their name at 10:00:01. Two events are published. A consumer processes the first event at 10:00:03 and calls the API, but by then the API returns the state after both changes. The consumer sees the name change while handling the address event. When it processes the second event, it calls again and gets the same state.
So the consumer never sees the intermediate state that the first event described. For a consumer that only needs the latest state, that may be harmless. For one that reacts to specific transitions, such as sending an email when the tier changes, it can skip a change or apply it twice. The event says one thing and the callback returns another.
8 messages in order. Play them, or step through them one at a time.
4Event-Carried State Transfer and Its Costs
With event-carried state transfer, the CustomerUpdated event contains the customer's new state, for example id, name, tier, preferred language and a version number. Each consumer applies the snapshot to its own local copy, a table or a cache. The 16 million callbacks disappear, the race disappears because each event carries exactly the state it describes, and consumers keep working when the customer service is down.
It has real costs. Payloads are larger, perhaps 1 KB instead of 100 bytes, which at 2 million events a day is still only about 2 GB a day. The schema becomes a wider contract, so changing a field means agreeing with consumers and following compatibility rules. And personal data such as names, emails and addresses is copied into every consumer, which spreads the responsibility for protecting and deleting it. So we send only the fields consumers have a reason to hold, not the whole customer record.
5Commands Are a Different Contract
Sometimes teams put commands on the same topic as events, for example a SendWelcomeEmail next to CustomerUpdated. That blurs ownership. An event topic belongs to the producer, who states facts; a command topic belongs to the receiver, who defines what requests it accepts and may reject them. Mixing them makes it unclear who owns the schema and who must handle failures. Commands, when we need them on Kafka, get their own topic owned by the service that executes them.
6The Recommendation
For this case, we move to event-carried state: CustomerUpdated carries a versioned snapshot of the fields consumers need, keyed by customer id so all changes to one customer stay in order on one partition. The version number lets consumers ignore an older snapshot that arrives after a newer one. The REST API stays for rare lookups, such as a consumer bootstrapping a customer it has never seen, and the topic can be compacted, or paired with a compacted state topic, so new consumers can load the current state of every customer.
7Follow-up questions
When is a delta event (only the changed fields) better than a full snapshot?
A delta is better when entities are large and changes are small, when consumers care about what changed rather than the full state, or when sending unchanged personal data would spread it for no reason. Its weakness is that a consumer that missed one delta has a wrong copy until the next full state, so deltas need strict ordering and a way to resynchronise, such as periodic snapshots or a compacted state topic. Many designs send the full snapshot plus a list of changed field names, which serves both kinds of consumer.
Does event-carried state mean consumers never call the API?
Not never. A new consumer may load initial state from a compacted topic or the API, and rare fields that only one consumer needs can stay behind an API call. The goal is that normal processing does not depend on the source service being available.
8Conclusion
In this answer, we saw that event notification sends a thin fact and makes every consumer call back, which here costs 16 million calls a day, puts the customer service on every critical path and creates a race where callbacks return newer state than the event. Event-carried state transfer puts the needed state in the event, so consumers keep local copies and stay independent, at the cost of larger payloads, a wider contract and copied personal data. Commands are requests to one owner and belong on their own topics. For this case, a versioned customer snapshot keyed by customer id is the right choice.
Open with
Event notification is a thin fact, like CustomerUpdated with just the id, type and time; consumers must call back for the data. Event-carried state transfer puts the state consumers need, often a full snapshot of the entity, into the event.
Then, if they want more
A command, like ChargeCard or SendEmail, is a request addressed to one owner who may refuse it, while an event is a past-tense fact the producer does not expect anyone in particular to act on, so I would not mix them on one topic.
In this scenario, thin events mean eight consumers times two million events, sixteen million extra API calls a day, and the customer service sits on every consumer's critical path.
There is also a race: by the time a consumer calls the API, the customer may have changed again, so it sees a newer state than the event describes and can skip or double-apply intermediate changes.
I would move to event-carried state: a versioned snapshot keyed by customer id, so changes to one customer stay ordered and consumers can ignore stale versions and keep working when the customer service is down.
The costs are bigger payloads, a wider schema contract and personal data copied into consumers, so I would include only fields consumers have a reason to hold, and keep the API for rare lookups.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Apache Kafka documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Explain the difference between event notification, event-carried state transfer and a...": https://scrivio-interview-library.netlify.app/spring-boot/kafka-design/8cdc222d96/