Skip to main content

Change data capture

A write to FluxDB does more than land on disk. A committed change can be turned into a change event and delivered to anything that subscribes: an incremental materialized view, a downstream pipeline, a change-event consumer. This page is that mechanism, the one change-event model it uses, and a plain account of which parts are wired today and which are still owed.

Read the honest ceiling first

The change-event model is uniform across every FluxDB engine, and all seven engines emit real change events at their actual write and delete callsites: relational, document, graph, vector, search, time-series and lakehouse tables. Emission is best-effort and can never break the write. Two honesty points frame the rest of this page. First, shard-engine emission is consumer-activated: a cell publishes change events only once a consumer turns on write capture, so until a consumer is wired, emission is a clean no-op. Second, the default feed is an in-memory, per-cell, bounded ring buffer; a durable, offset-replayable journal is available as an opt-in, off by default, for a consumer that needs restart-safe replay. Cross-cell convergence spans the transactional, analytical, document, graph, vector, search, time-series and structures engines; the lakehouse table formats (Iceberg and Delta) do not converge across cells yet. The sections below say which is which at each point.

The change-event model​

Every change, whatever engine produced it, is described by one record. The model is deliberately uniform so a subscriber reads changes from different engines the same way.

FieldWhat it carries
Event id and timestampA unique id and the commit time in milliseconds
Database and tableThe database the change belongs to, and the table, collection, index or space it touched
Engine typeWhich engine produced the change: transactional, document, graph, vector, search, time-series or lakehouse table
OperationInsert, update or delete
ShardThe shard the change was committed on
Before and afterThe row image before the change, the image after, or both, so a consumer can tell what changed
MetadataEngine-specific detail, such as a lakehouse snapshot or version id

Because the shape is the same across engines, a document insert, a graph edge addition and a transactional row update are all read through one interface. The difference between them is the engine-type field, not a different consumer for each.

Which engines emit changes​

This is the part to be exact about. The model covers every engine, and every engine emits at its real write and delete callsite. What varies is whether a consumer has turned emission on, and whether a feed converges across cells.

EngineEmits at the real callsiteWhat it emits
Relational / SQL (transactional)YesEvery committed row write, one event per changed row, reusing the images the write already captured
DocumentYesInsert, upsert and delete, each with a before-image
GraphYesAdd and delete of a vertex or an edge, including one event per cascaded edge when a vertex delete cascades
VectorYesUpsert and delete
SearchYesIndex and delete
Time-seriesYesIngest and append only; retention eviction and deletes emit no change event
Lakehouse table (Iceberg, Delta)YesIceberg snapshot-commit and Delta version-commit, metadata-only, live by default once a scale-out manager is registered

Emission sits at the actual write and delete path of each engine, best-effort, so a problem capturing a change can never break the write itself or its replication. Two qualifications complete the picture, and both matter:

  • Shard-engine emission is consumer-activated. A cell publishes change events only once a consumer turns on write capture: a materialized view, the in-cell Debezium-envelope bridge, the cloud-broker sink, the lakehouse provider or a dimensional refresh. Until a consumer is wired, emission is a clean no-op. The path is wired and ready, not unconditionally publishing.
  • The structures (Redis-compatible, key-value) engine emits CDC on its writes. A set, delete or compare-and-set, and every mutation the command engine applies, emits one change event, and those events converge across cells through command replay. Not every operation emits yet: TTL expiry, the distributed operations and bulk entry writes do not, and EXPIRE and EVICT are deliberately silent as per-cell lifecycle events rather than logical writes.

A vector delete rides a WAL-durable tombstone with stable ids, so a replayed tombstone does not resurrect a vector after a restart. That durability is the vector engine's own data WAL, not the CDC feed, and CDC is suppressed during WAL replay; the mechanism is detailed on the engines page.

How a write becomes a change event​

The path from a committed write to a delivered event is short and specific, and it is the same shape for every engine that emits.

Figure: a committed write or delete, from any of the seven emitting engines, is turned into a change event at the engine callsite and published to the per-cell change feed, which delivers it to the incremental materialized-view refresher and to any other subscriber whose pattern matches. The optional cloud-broker sink (dashed) is one more subscriber, off by default.

The feed itself is an in-memory event log with publish and subscribe. It keeps a bounded history of recent events and delivers each new event to every subscriber whose pattern matches it. A subscriber that raises on an event is logged and isolated, so one bad consumer does not stop delivery to the others.

The default feed is in-memory; a durable journal is an opt-in

The change feed holds a bounded window of recent events, about 10,000, in memory on the cell that produced them, and that in-memory feed is the default. It does not survive a restart, and you cannot replay it from an offset. For a consumer that needs restart-safe replay, a durable, offset-ordered journal is available as an opt-in, off by default: it appends each event to a per-cell log before fan-out and lets a consumer resume from its last committed offset after a restart, with at-least-once delivery across a mid-event crash. It uses the transactional engine to site its file, and the in-memory feed stays in place for consumers that do not opt in.

Cross-cell convergence spans the transactional, analytical (OLAP), document, graph, vector, search, time-series and structures engines: a replica re-emits the change event as it applies the originating cell's write, tagged with that cell's id, so a multi-cell database's changes read consistently for those engines. The lakehouse table formats, Iceberg and Delta, do not converge across cells yet; that is a separate lane and is owed. Delete events on the transactional cross-cell path carry the primary key only, with an empty before-image.

Subscribing to a change feed​

A subscriber registers a pattern and receives every change event whose topic matches it. Topics are dot-delimited and built from the database, the engine and the table, so a pattern can be as broad or as narrow as you need.

PatternWhat it receives
cdc.<db>.*Every change in one database, across all its engines
cdc.*.<engine>.*Every change from one engine type, across databases
cdc.<db>.<engine>.<table>Changes to one table in one database

Alongside live subscription, the feed answers a history query: the changes for a database since a given timestamp, optionally narrowed to an engine or a table, up to a limit. That history is bounded by the in-memory window described above, so it is a recent-changes query, not a full replay from the beginning of time.

The Debezium-compatible bridge​

FluxDB can present its changes in the Debezium envelope, the widely understood shape for change events, so a consumer written against that format can read FluxDB changes without a FluxDB-specific client.

A bridge subscribes to the transactional change feed and maps each change event to a Debezium-format publish: a delete carries the before image, an insert the after image, an update both. Every record is workspace-and-table tagged from the change event, so a consumer scoped to one workspace never receives another workspace's rows. Nothing is synthesized. Every emitted record is the image of an observed write.

Debezium-compatible envelope, not a Kafka Connect deployment

The bridge produces the Debezium envelope and delivers it in-process to a pipeline source that drains it. It is not a Debezium or Kafka Connect connector, and it does not stand up a broker. The whole path stays in-process: the in-memory feed, the envelope publisher, and an in-process consumer, with no broker and no cloud dependency, which is what keeps it valid under sovereign and air-gapped deployment. If you are expecting a hosted Kafka topic to subscribe to from outside the estate, that connector is not present. The compatibility is at the record format, so an in-estate consumer reads a familiar shape. The in-cell bridge stays a Debezium-envelope, in-process bridge; the optional cloud-broker sink described below is the separate external leg, off by default.

The bridge adds no durable store of its own. A change record lives only in the publisher's callback chain and the consumer's in-memory drain buffer. Erasure of the underlying row is authoritative at its FluxDB store and at whatever sink the pipeline writes to. There is no second durable copy of the change to purge.

The external cloud-broker sink​

A change-feed sink exports change events to managed cloud brokers. It is a consumer of the feed like any other, and it is off by default: deny-closed, enabled only by explicit configuration. The sink speaks to nine managed cloud transports through genuine SDK clients, with credentials held by reference.

CloudManaged transports
AWSSQS, SNS, Kinesis, EventBridge
AzureService Bus, Event Hubs, Event Grid
GCPPub/Sub, Cloud Tasks

There is no Kafka, NATS or Redpanda client: the sink targets only the nine managed cloud transports above. Because it reaches an external broker, it is a cloud-enabled leg, not a sovereign or air-gapped one, so it is absent unless a deployment both turns it on and can reach a managed cloud broker.

Feeding materialized views, streaming and messaging​

The change feed is the single backbone the rest of the platform reads changes from. It drives three consumers, at three levels of maturity.

Incremental materialized views. Wired. A bridge subscribes the materialized -view refresher to the change feed for a view's source tables and maps each change event to the refresher's own change record. The result is that a materialized view is maintained incrementally off the same committed writes that replication sees, rather than being rebuilt. For a join view the bridge tracks which source table changed so the refresher updates the correct side. A refresh that raises on one view is isolated and logged, and the other views still refresh. This is the production consumer of CDC today, and it is wired from the first materialized view onward: creating one turns on write capture.

Streaming and pipelines. Wired, through the Debezium bridge. A pipeline source drains the Debezium-envelope feed described above, so committed changes flow into a pipeline in-process. The path is in-process rather than brokered, and it inherits the consumer-activation and in-memory-feed ceilings stated above.

Messaging. An optional, off-by-default cloud-broker sink. The external cloud-broker sink described above publishes change events onto managed cloud brokers across AWS, Azure and GCP, nine managed transports in all. It is deny-closed, enabled only by explicit configuration, and it is a cloud-enabled leg: there is no Kafka, NATS or Redpanda client, and the sink is absent on a sovereign or air-gapped deployment unless a managed cloud broker is reachable.

Across the deployment matrix​

  • Single cell. The change feed, the Debezium bridge and the materialized-view consumer all run in-process on the one cell. A single-cell database's feed is complete for that database.
  • Multi-cell. Change-event convergence spans the transactional, analytical, document, graph, vector, search, time-series and structures engines: a replica re-emits the change event as it applies the originating cell's write, tagged with the originating cell id, so those changes read consistently database-wide. The lakehouse table formats (Iceberg and Delta) do not converge across cells yet.
  • Sovereign and air-gapped. The in-cell path is in-process, with no broker and no cloud, so CDC, the Debezium-envelope feed and incremental materialized views all hold with nothing external installed. The optional cloud-broker sink is a cloud-enabled leg and is absent here.