intermediateCRUD & Exposing Data
In a system fed by Kafka events, why do CRUD read endpoints usually query a local database rather than Kafka directly?
Kafka topics aren't optimized for ad-hoc queries (filter, sort, paginate) — they're an ordered log meant to be consumed sequentially. The standard pattern is a consumer that persists incoming events into a queryable local database (essentially a materialized view of the event stream), and REST read endpoints query that database, not the topic itself.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.
In a system fed by Kafka events, why do CRUD read endpoints usually query a local database rather than Kafka directly?