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?

Next Step

Continue to Why might a write ('create') endpoint in an event-driven service publish to Kafka instead of writing directly to its own database?← Back to all Kafka & Microservices questions