0
0
Kafkadevops~20 mins

Kafka Connect architecture - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Kafka Connect Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the role of a Kafka Connect Worker?

In Kafka Connect architecture, what is the primary role of a Worker?

AIt runs connectors and tasks to move data between Kafka and external systems.
BIt stores the Kafka topics and manages partitions.
CIt acts as a Kafka broker to route messages between producers and consumers.
DIt provides a user interface for managing Kafka topics.
Attempts:
2 left
💡 Hint

Think about which component actually executes the data movement jobs.

Predict Output
intermediate
2:00remaining
What is the output of this Kafka Connect REST API call?

Given a Kafka Connect cluster with two workers, what is the expected output of the REST API call GET /connectors if there are three connectors named source1, sink1, and sink2?

Kafka
curl -X GET http://localhost:8083/connectors
A{"connectors": ["source1", "sink1", "sink2"]}
B["source1", "sink1", "sink2"]
C[{"name": "source1"}, {"name": "sink1"}, {"name": "sink2"}]
Dsource1, sink1, sink2
Attempts:
2 left
💡 Hint

Check the Kafka Connect REST API documentation for the format of the connectors list response.

Predict Output
advanced
2:00remaining
What happens when a Kafka Connect task fails repeatedly?

Consider a Kafka Connect task that fails to start due to a configuration error. What is the expected behavior of the Kafka Connect framework regarding this task?

AThe task is paused and requires manual restart from the user interface.
BThe task immediately stops and the connector is removed from the cluster.
CThe task logs the error once and then continues running with default settings.
DThe task retries starting indefinitely with exponential backoff until fixed or manually stopped.
Attempts:
2 left
💡 Hint

Think about fault tolerance and automatic recovery in Kafka Connect.

🧠 Conceptual
advanced
2:00remaining
How does Kafka Connect achieve fault tolerance in distributed mode?

In distributed mode, how does Kafka Connect ensure fault tolerance and high availability of connectors and tasks?

ABy using a single leader worker that handles all connectors and tasks exclusively.
BBy replicating all connector configurations to each worker's local disk.
CBy running multiple workers that coordinate via Kafka topics to share task assignments and state.
DBy storing all data in an external database separate from Kafka.
Attempts:
2 left
💡 Hint

Consider how Kafka Connect uses Kafka itself for coordination.

🚀 Application
expert
2:00remaining
Determine the number of tasks for a source connector

You configure a Kafka Connect source connector to read from 5 partitions of an external system. The connector's tasks.max is set to 3. How many tasks will Kafka Connect create to read data?

A3 tasks, because <code>tasks.max</code> limits the maximum tasks created.
B5 tasks, one per partition regardless of <code>tasks.max</code>.
C1 task, because Kafka Connect uses a single task by default.
D8 tasks, combining partitions and <code>tasks.max</code>.
Attempts:
2 left
💡 Hint

Remember that tasks.max limits the number of tasks, but tasks can handle multiple partitions.