Source connector
External system → Kafka
Examples:
- Debezium Postgres/MySQL CDC → topics
- JDBC source polling tables → topics
- File / S3 source → topics
Database / API / Files ===source===> Kafka topics
Sink connector
Kafka → external system
Examples:
- JDBC / Snowflake / BigQuery sink
- Elasticsearch sink
- S3 / GCS sink for data lake landing
- MongoDB sink
Kafka topics ===sink===> Warehouse / Search / Object storage
Together in a pipeline
Orders DB --source CDC--> topic orders.public.orders --sink--> analytics warehouse
Interview details that score points
- Source connectors track offsets/positions (binlog file+pos, LSN, etc.).
- Sink connectors must handle idempotency / upserts because Kafka delivery is often at-least-once.
- Use Schema Registry + Avro/Protobuf for stable contracts between source and sink.
Interview tip: "Source imports into Kafka; sink exports out of Kafka. Connect is the framework that runs both."