CCDAK practice question 12 of 25
You are using JDBC source connector to copy data from a table to Kafka topic. There is one connector created with max.tasks equal to 2 deployed on a cluster of 3 workers. How many tasks are launched?
Full set: 150 questionsThe tasks.max configuration in Kafka Connect sets the maximum number of tasks that can be created for a connector. However, the connector itself determines the actual number of tasks based on its ability to partition the source data. The JDBC Source Connector, when configured to query a single table without a specified incrementing or timestamp column (i.e., using the default mode='bulk'), cannot parallelize the query. The entire table is treated as a single unit of work. Therefore, even though tasks.max is set to 2, the connector can only create and use a single task to perform the data copy.
A. 3: The number of tasks is determined by the connector's partitioning logic and tasks.max, not by the number of available workers in the cluster.
B. 2: tasks.max is an upper limit, not a guaranteed number of tasks. The connector will create fewer tasks if the work cannot be logically divided.
D. 6: This value is likely a distractor derived from multiplying workers by tasks.max (3 2), which is not how Kafka Connect calculates task distribution.
1. Confluent Documentation, JDBC Source Connector for Kafka Connect:
Section: tasks.max configuration.
Content: "The maximum number of tasks for the JDBC source connector. This is used to scale up the number of tasks that will be used to read from a database. In some modes (e.g., bulk), the connector will not use more than one task." This explicitly states that in bulk mode, which is the default for a simple table copy, only one task is used.
Reference: Confluent, Inc. (2023). JDBC Source Connector for Kafka Connect Configuration Properties. https://docs.confluent.io/kafka-connectors/jdbc/current/source-connector/sourceconfigoptions.html#connector (Refer to the description for tasks.max).
2. Confluent Documentation, Kafka Connect Concepts:
Section: Tasks.
Content: "Source connectors can also be limited to a certain number of tasks regardless of how many partitions the topic has. The connector developer decides how to break down the job of pulling data from a source system into multiple tasks." This confirms that the connector's internal logic, not just the configuration, dictates the final task count.
Reference: Confluent, Inc. (2023). Kafka Connect - Concepts. https://docs.confluent.io/platform/current/connect/concepts.html#tasks.
Keep practicing
Take the free CCDAK practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CCDAK practice questions
- Question 1In Avro, removing or adding a field that has a default is a __ schema evolution
- Question 2A topic has three replicas and you set min.insync.replicas to 2. If two out of three repl…
- Question 3To get acknowledgement of writes to only the leader partition, we need to use the config.…
- Question 4A customer has many consumer applications that process messages from a Kafka topic. Each …
- Question 5What information isn't stored inside of Zookeeper? (select two)
- Question 6If you enable an SSL endpoint in Kafka, what feature of Kafka will be lost?
