0
0
Kafkadevops~10 mins

Connector configuration in Kafka - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the connector name.

Kafka
{
  "name": "[1]",
  "config": {
    "connector.class": "FileStreamSource"
  }
}
Drag options to blanks, or click blank then click option'
Asource-connector
Bfile-connector
Cconnector1
Dmy-connector
Attempts:
3 left
💡 Hint
Common Mistakes
Leaving the name field empty or missing quotes.
Using invalid characters in the connector name.
2fill in blank
medium

Complete the code to specify the connector class.

Kafka
{
  "name": "source-connector",
  "config": {
    "connector.class": "[1]",
    "tasks.max": "1"
  }
}
Drag options to blanks, or click blank then click option'
AFileStreamSink
BFileStreamSource
CJdbcSourceConnector
DKafkaSinkConnector
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing source and sink connector classes.
Using a class name that does not exist.
3fill in blank
hard

Fix the error in the configuration by completing the missing topic name.

Kafka
{
  "name": "file-source-connector",
  "config": {
    "connector.class": "FileStreamSource",
    "tasks.max": "1",
    "file": "/tmp/test.txt",
    "topic": "[1]"
  }
}
Drag options to blanks, or click blank then click option'
Atest-topic
Bfile-topic
Csource-topic
Dinput-topic
Attempts:
3 left
💡 Hint
Common Mistakes
Leaving the topic name empty or misspelled.
Using a topic name that does not exist in Kafka.
4fill in blank
hard

Fill both blanks to configure the maximum tasks and the file path.

Kafka
{
  "name": "file-source-connector",
  "config": {
    "connector.class": "FileStreamSource",
    "tasks.max": "[1]",
    "file": "[2]",
    "topic": "test-topic"
  }
}
Drag options to blanks, or click blank then click option'
A1
B/var/log/input.log
C/tmp/data.txt
D3
Attempts:
3 left
💡 Hint
Common Mistakes
Setting tasks.max to a non-numeric value.
Using an invalid file path.
5fill in blank
hard

Fill all three blanks to complete the connector configuration with name, class, and topic.

Kafka
{
  "name": "[1]",
  "config": {
    "connector.class": "[2]",
    "tasks.max": "1",
    "file": "/tmp/input.txt",
    "topic": "[3]"
  }
}
Drag options to blanks, or click blank then click option'
Afile-source-connector
BFileStreamSource
Cinput-topic
Dsource-connector
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the connector class with the topic name.
Using inconsistent names across fields.