Meili CDC Docs

Sources and connectors

meilisearch-cdc reads changes from eleven kinds of sources. A connector stores how to reach one source; tasks pick a connector and add the table.

Supported sources

SourceType idCapture methodSnapshotTRUNCATE / drop
PostgreSQLpostgresLogical replication, pgoutputKeyset pages of 5,000 rowsCaptured
MySQL 8mysqlBinary log (as a replica)Keyset pages of 5,000 rowsCaptured
MariaDBmariadbBinary log (as a replica)Keyset pages of 5,000 rowsCaptured
MongoDBmongodbChange streamsCollection scanDrop, rename, dropDatabase
DynamoDBdynamodbDynamoDB StreamsParallel scan (4 segments)No
CouchDB / Cloudantcouchdb_changes feed (longpoll)_all_docs pagesNo
SQL ServersqlserverNative CDC change tablesKeyset pages of 5,000 rowsNo
CockroachDBcockroachdbCore (sinkless) changefeedConsistent read AS OF SYSTEM TIMENo
Kafka (Debezium)kafkaDebezium JSON envelopesTopic replay, folded per keyDebezium op: t
Redis StreamsredisXREADStream replay, folded per keyop truncate entries
SQL pollingsqlpollIncremental cursor column (PostgreSQL, MySQL, SQLite drivers)Keyset pages of 1,000 rowsNo
WebhookwebhookHTTP push to /api/v1/ingest/{task}None (push only){"op":"truncate"}

When a source reports a truncate, the task is held unless the task allows it (sync.safety.allowTruncate); with it allowed, every document of the index is deleted. See safety guards.

Connectors

A connector is a saved source connection: its type and the connection fields of that type. Credentials are stored once, encrypted, and never returned by the API (passwords in connection strings and DynamoDB secret keys come back masked as ••••••). Tasks reference a connector with source.connectorId and add only table-level fields.

The Connectors page listing saved source connections with their type, host, last test result and the tasks that use them
Connectors with their last test result and the tasks using them.
TypeConnection fields (connector)Table-level fields (task)
postgresdsnschema, table, slot, publication
mysql, mariadbdsn, databasedatabase, table, serverId
mongodbdsn, databasedatabase, table (collection)
dynamodbregion, endpoint, accessKeyId, secretAccessKeytable
kafkabrokersgroupId, table (topic)
sqlpolldriver, dsntable, cursorColumn, pollInterval
couchdbdsntable (database)
sqlserverdsnschema, table (and slot, the capture instance, through the API)
cockroachdbdsntable (and schema through the API)
redisdsntable (stream key)
webhooknonetable (a name for the feed)

A task's database overrides the connector's, so one MySQL or MongoDB connector can serve several databases on the same server.

Testing and browsing

  • A connector is tested in the background when it is created or saved, and on demand with Test. The result (OK or the error, latency, server version, number of tables) is kept and shown as the last test.
  • The connector page lists what the connector can see: tables and views, collections, topics, streams or databases, with row estimates when the source provides them (at most 1,000 entries, filterable). Creating a task from a listed table pre-fills the wizard.
  • Creating, editing, deleting and testing connectors needs the admin role (the route table does not grant connector tests to moderators).

Changing and deleting

  • Saving a connector with the masked password keeps the stored one. Changing a password restarts the running tasks that use the connector.
  • A connector that tasks still use cannot be deleted (409 with the list of tasks).

Inline connections

The API and the tasks file also accept the connection fields directly in a task's source (type, dsn, …) without a connector. The dashboard's wizard always works through a connector.

What every source has in common

  • Validation first. Each source checks its prerequisites when the task starts and fails with a message saying what to change. These are permanent errors: the task goes to failed instead of retrying.
  • Position before snapshot. The stream position is captured before the snapshot, so changes made during the copy are replayed afterwards.
  • Lost position → resync. If the stored position no longer exists on the source (purged log, dropped slot, expired shard, trimmed stream), the task logs source position lost and runs a full snapshot again by itself.
  • A primary key. Documents need an id. It comes from the table's primary key, or from mapping.primaryKey when the source has none or you want another one.
  • Value conversion. Times become RFC 3339 strings (or Unix seconds or milliseconds, per task), binary values become base64 strings, NaN and infinities become null, and nested JSON stays nested.

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.