A Source Connector is a component that imports data from an external system into Kafka topics. It acts like a bridge, continuously pulling data from the source and pushing it into Kafka.
Click to reveal answer
beginner
Name two common external systems from which Kafka Source Connectors can import data.
Common external systems include databases (like MySQL, PostgreSQL) and file systems (like CSV files or logs). Source connectors read data from these and send it to Kafka.
Click to reveal answer
intermediate
How does a Source Connector handle data format conversion?
Source Connectors convert the external data into Kafka's message format, often using serializers like JSON or Avro, so Kafka can store and process the data efficiently.
Click to reveal answer
intermediate
What is the role of Kafka Connect in managing Source Connectors?
Kafka Connect manages the lifecycle of Source Connectors, including starting, stopping, and scaling them. It also handles fault tolerance and configuration management.
Click to reveal answer
beginner
Explain the difference between a Source Connector and a Sink Connector.
A Source Connector imports data into Kafka from external systems, while a Sink Connector exports data from Kafka to external systems. They work in opposite directions.
Click to reveal answer
What does a Kafka Source Connector do?
AImports data from external systems into Kafka
BExports data from Kafka to external systems
CManages Kafka cluster nodes
DMonitors Kafka topic sizes
✗ Incorrect
A Source Connector imports data from external systems into Kafka topics.
Which of these is NOT typically a source for a Kafka Source Connector?
ARelational databases
BFile systems
CKafka topics
DMessage queues
✗ Incorrect
Kafka topics are the destination, not a source, for Source Connectors.
How does Kafka Connect help with Source Connectors?
ABy storing data permanently
BBy managing their lifecycle and configuration
CBy encrypting Kafka messages
DBy creating Kafka topics automatically
✗ Incorrect
Kafka Connect manages starting, stopping, and configuring Source Connectors.
What data format might a Source Connector use to send data to Kafka?
AMarkdown
BHTML
CCSS
DJSON
✗ Incorrect
JSON is a common data format used by Source Connectors to serialize data for Kafka.
Which statement is true about Source and Sink Connectors?
ASource Connectors send data into Kafka; Sink Connectors send data out
BBoth send data into Kafka
CBoth send data out of Kafka
DThey perform the same function
✗ Incorrect
Source Connectors bring data into Kafka; Sink Connectors export data from Kafka.
Describe what a Kafka Source Connector is and how it works in simple terms.
Think of it as a data pipeline from outside systems into Kafka.
You got /4 concepts.
Explain the difference between Source Connectors and Sink Connectors in Kafka Connect.
One brings data in, the other sends data out.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of a Kafka source connector?
easy
A. To automatically import data from external systems into Kafka topics
B. To export data from Kafka topics to external systems
C. To monitor Kafka cluster health
D. To manage Kafka topic partitions
Solution
Step 1: Understand the role of source connectors
Source connectors are designed to bring data from outside systems into Kafka topics automatically.
Step 2: Differentiate from sink connectors
Sink connectors do the opposite by exporting data from Kafka to external systems, so they are not the correct answer here.
Final Answer:
To automatically import data from external systems into Kafka topics -> Option A
Quick Check:
Source connector = import data [OK]
Hint: Source connectors bring data into Kafka topics [OK]
Common Mistakes:
Confusing source connectors with sink connectors
Thinking connectors manage Kafka internals like partitions
Assuming connectors monitor Kafka health
2. Which of the following is the correct JSON field to specify the connector class in a Kafka source connector configuration?
easy
A. "sourceConnector"
B. "source.class"
C. "connectorType"
D. "connector.class"
Solution
Step 1: Recall Kafka Connect configuration syntax
The key to specify the connector implementation class is always "connector.class" in the JSON config.
Step 2: Eliminate incorrect options
Other options like "source.class", "connectorType", or "sourceConnector" are not valid Kafka Connect configuration keys.
Final Answer:
"connector.class" -> Option D
Quick Check:
Connector class key = "connector.class" [OK]
Hint: Use "connector.class" to specify connector type [OK]
Common Mistakes:
Using incorrect or made-up JSON keys
Confusing source connector config keys with sink connector keys
Omitting quotes around JSON keys
3. Given this Kafka Connect source connector configuration snippet: