Command vs Event vs State
The three things a message can be
Every record on a topic is one of these, and mixing them is the root of most event-driven design pain:
| Intent | Tense | Ownership | Example |
|---|---|---|---|
| Command | imperative | sender decides outcome | ChargeCard |
| Event | past tense | emitter states a fact | CardCharged |
| State | present, keyed | latest-value-per-key | AccountBalance=4200 |
Commands have exactly one logical handler and can be rejected. Events are
immutable facts with zero-to-many subscribers and can never be rejected (they
already happened). State is what you get when you compact a stream of events by
key. The single most common beginner mistake is publishing commands dressed up as
events (SendEmail on a topic named email.events) — now you have hidden
point-to-point coupling masquerading as pub/sub.