Integration / Apache Kafka Interview questions
What is the difference between Kafka Connect source and sink connectors?
Both run inside a Kafka Connect worker and are configured declaratively rather than coded by hand, but they move data in opposite directions.
| Source Connector | Sink Connector |
| Pulls data FROM an external system INTO a Kafka topic. | Pulls data FROM a Kafka topic and pushes it INTO an external system. |
| Example: JdbcSourceConnector reading database table changes into a topic. | Example: S3SinkConnector writing topic records out as files in object storage. |
| Tracks its own 'source offset' (e.g. a database row ID or file position) to know where to resume. | Tracks Kafka consumer offsets, like any consumer group, to know what's been delivered. |
| Effectively acts as a specialized producer. | Effectively acts as a specialized consumer. |
A single Connect deployment commonly runs both kinds together to build an end-to-end pipeline — for example, a JDBC source connector streaming database changes into a topic, with an Elasticsearch sink connector on the other end indexing those same records for search, with no custom application code written for either half of that pipeline.
More Related questions...