Definition: Change stream
A change stream is a table declaration — change_stream: { function } — that invokes a named function with batched changes to that table’s items. It is how a KERNSTACK table announces writes without a separate queue or streaming product.
How a change stream behaves
The stream delivers changes written after it is first enabled, batched, to a function of the same stack — workers cannot be the target. Redeploying an unchanged stream keeps its position in the feed; removing the declaration disables the stream on the next deploy, and re-adding it starts fresh from that deploy. Configuration changes reach delivery within about ten seconds of deploy.
What change streams are used for
Fanout without a message bus: an orders table streams to a function that notifies subscribers; an audit pattern streams writes into before/after records; a search pattern reacts to edits. Because the hook is part of the table’s declaration, the plan shows “this table will start invoking that function” as a reviewable consequence of a change.
Frequently asked questions
No. It delivers changes written after the stream is first enabled. Re-adding a removed stream starts from the new deploy — backfills over existing rows are a separate, explicit job.
No — the target must be a function of the same stack. Long processing behind a stream starts in the function and hands off to workers or workflow steps from there.
Position is kept across redeploys of an unchanged stream, so deploys neither skip nor redeliver the feed — the behaviour that makes stream-driven fanout safe to operate.
Related capabilities, architectures, and comparisons
Ship your stack on the Software Lifecycle Cloud.
Closed preview on dedicated European infrastructure. Bring a repository or start from a blueprint.