liveBook · Manning

Data stream

As explained in Kafka Streams in Action, Second Edition

An event stream is a continuous flow of independent records in which records sharing a key are not updates to one another.

A data stream, or event stream, is a continuous flow of independent records produced by people or machines. Each record represents something that happened, such as a purchase, link click, sensor transmission, or package handoff. section 1.1 section 1.2

Treat each event as a record with three conceptual parts:

  • Key — identifies the event and can support routing or grouping, such as a customer ID. section 1.2
  • Value — carries the event payload, such as a purchased item or sensor trigger. section 1.2
  • Timestamp — records when the event occurred. section 1.2

Read a stream as an ordered sequence of independent occurrences, not as successive updates to one object. Even records with the same key remain separate events; viewed as a database, each record resembles an insert into a table. section 8.1

Tracking a delivered package

One purchase generates a sequence of events: the initial order, each custody transfer, arrival at a distribution center, loading for delivery, and final handoff. Each action contributes a timestamped record to the stream. section 1.3

Table 1.1 Definitions
Event
Something that occurs and attributes about it recorded
Event Stream
A series of events captured in real-time from sources such as mobile or IoT devices
Event Streaming Platform
Software to handle event streams—capable of producing, consuming, processing, and storage of event streams
Apache Kafka
The premier event streaming platform—provides all the components of an event streaming platform in one battle-tested solution
Kafka Streams
The native event stream processing library for Kafka

Use the definitions table to distinguish events, event streams, event-streaming platforms, Apache Kafka, and Kafka Streams. section 1.2

Figure 1.1 A sequence of events comprising an event stream starting with the online purchase of the flux capacitor
figure

Follow the package timeline as a visual model of independent events accumulating into one unbounded stream. section 1.3

How Kafka Streams in Action, Second Edition covers it

How deep it goes
Defines event structure and independence, then relates records to table inserts without descending into implementation internals.
Examples
Uses purchases, web clicks, sensor transmissions, stock quotes, and package-custody scans as concrete stream records.
What it assumes
Teaches the event model from zero and assumes no prior event-streaming terminology.
What you can do after
Evaluate event-driven data as timestamped independent records and distinguish streams from update-oriented records.
How it connects
Connects events with event-streaming platforms, Apache Kafka, Kafka Streams, routing, grouping, and database tables.

Also explained in

Compare how 3 books explain data stream →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka Streams in Action, Second Edition. The section links point to the parts of the book it draws on.