- Kafka: the stream binds to a topic and tracks consumer offsets per partition.
- Postgres: the stream binds to a table and owns a logical replication slot on the source. See the Postgres CDC guide.
- MongoDB: the stream binds to a collection and tracks a change-stream position. See the MongoDB CDC guide.
READ_STREAM. Postgres and MongoDB streams are usually consumed by a CDC table, which applies the changes continuously. Stream metadata is visible in information_schema.streams.
Kafka streams
Kafka stream types
For
RAW_TEXT and BINARY stream types, define a single column named data with the matching type.Postgres streams
CREATE STREAM connects to the source and creates the stream’s logical replication slot. If the source table is partitioned, leaf partitions are discovered automatically and one slot is created per leaf, each requiring a dedicated publication; see Partitioned source tables.
MongoDB streams
ALTER STREAM
ALTER STREAM applies to Kafka streams only. For Postgres and MongoDB streams, schema changes are drop-and-recreate.
Reposition a Kafka stream’s consumer offset on a partition:
DROP STREAM
- Kafka: none; the topic is untouched.
- Postgres: the stream’s replication slot (or slots, for a partitioned source) is dropped on the source, so it stops retaining WAL. If the source is unreachable, the stream is still dropped and the error message names the leftover slot for manual removal.
- MongoDB: none; change streams hold no server-side resource.
information_schema.cdc_ingests.
Related
READ_STREAM: read data from a stream.- CREATE CDC TABLE: apply a change stream continuously.
information_schema.streams: stream metadata and consumer offsets.- Change data capture: concepts and guides.