Meili CDC Docs

Meili CDC user guide

meilisearch-cdc copies a table once, then streams every insert, update and delete into a Meilisearch index in near real time. It ships as one self-contained program with an embedded state store and a live dashboard, and it starts with zero configuration.

The meilisearch-cdc dashboard overview with tasks by state, throughput, snapshot progress and Meilisearch destinations
The overview page: every pipeline, its throughput and the health of each Meilisearch instance, updated live.

What it is

meilisearch-cdc is a change data capture (CDC) service for Meilisearch. You connect a database (or a stream, or your own application over HTTP), pick a table, and describe how rows become documents. The service then keeps a Meilisearch index in step with that table: it copies the existing rows once (the snapshot), then follows the database's change log and applies each change.

  • One binary, one data directory. State (tasks, checkpoints, users, alert history) lives in an embedded bbolt database, cdc.db, in the data directory.
  • Writes go through the official meilisearch-go SDK.
  • Everything is managed in the dashboard: sources, Meilisearch destinations, sync tasks, users, alerts and AI access. The same operations are available in the REST API, to AI agents over MCP, and on the server through the admin CLI.

How it works

Each task runs a small pipeline:

  1. Open and validate. The source connects and checks the server's prerequisites (for example wal_level=logical on PostgreSQL or binlog_format=ROW on MySQL). Problems that retrying cannot fix fail the task with a message that says what to change.
  2. Capture the position, then snapshot. The current source position (an LSN, binlog coordinates, a resume token…) is recorded before the copy starts, then every existing row is read in chunks and written to Meilisearch.
  3. Stream. When the snapshot is done, streaming starts from the position captured before it, so changes made during the copy are replayed and nothing falls into a gap.
  4. Checkpoint after confirmation. A position is saved only after Meilisearch confirms the batch that contains it. A crash, even kill -9, replays from the last checkpoint.

At-least-once delivery with idempotent writes

Because the checkpoint trails the confirmed writes, some changes can be delivered twice after a restart. That is harmless: each document is addressed by its primary key, so writing the same row again leaves the index in the same state. Changes to the same document inside one batch are coalesced, so only the final state is sent.

When something goes wrong

  • Transient errors (network, Meilisearch 5xx or 429, a full task queue) are retried with exponential backoff and jitter. If the pipeline itself fails, a supervisor restarts it with a backoff from 1 s up to 1 minute and the task shows retrying.
  • A payload that is too large is split in two and retried.
  • Documents Meilisearch rejects (an invalid id, a malformed _geo or vector…) are isolated by bisecting the batch; the rest is applied and the offenders go to the dead letter queue.
  • A lost source position (a purged binlog, a dropped replication slot, an expired stream shard) triggers an automatic full resync.
  • Safety guards hold the task (state held) instead of deleting a large share of the index or applying a TRUNCATE, until an operator decides. See safety guards.

Concepts

ConceptWhat it is
ConnectorA saved source connection: the source type and its credentials, encrypted at rest. It can be tested, and its tables, collections, topics or streams can be browsed. Many tasks can reuse one connector. See Sources and connectors.
DestinationA named Meilisearch instance: URL, API key, gzip, request timeout and a background health check every 5 s to 1 h. Its health, the tasks writing to it and the last sync time update live. See Destinations.
TaskConnector + table → destination + index. A task defines the column mapping, the index settings, batching, retries and safety guards. One table can feed several instances through several tasks. See Create a task.
IndexThe Meilisearch index a task writes to. The task creates it on first write with its primary key field, can manage its settings and reports drift. See Index management.
CheckpointThe last source position confirmed in Meilisearch, plus the position captured before the snapshot. Resetting it makes the next start copy everything again.

Features

Where to go next

Meili CDC user guide · last updated 2026-10-26 · Edit this page on GitHub

meilisearch-cdc is open source. Meilisearch is a trademark of Meili SAS; this project is not affiliated with it.