Confluent Certified Developer for Apache Kafka CCDAK Exam Practice Test

Page: 1 / 14
Total 150 questions
Question 1

If a topic has a replication factor of 3...



Answer : D

Replicas are spread across available brokers, and each replica = one broker. RF 3 = 3 brokers


Question 2

A Zookeeper ensemble contains 5 servers. What is the maximum number of servers that can go missing and the ensemble still run?



Answer : C

majority consists of 3 zk nodes for 5 nodes zk cluster, so 2 can fail


Question 3

Select all the way for one consumer to subscribe simultaneously to the following topics - topic.history, topic.sports, topic.politics? (select two)



Answer : A, D

Multiple topics can be passed as a list or regex pattern.


Question 4

Once sent to a topic, a message can be modified



Answer : A

Kafka logs are append-only and the data is immutable


Question 5

Your topic is log compacted and you are sending a message with the key K and value null. What will happen?



Answer : A

Sending a message with the null value is called a tombstone in Kafka and will ensure the log compacted topic does not contain any messages with the key K upon compaction


Question 6

To produce data to a topic, a producer must provide the Kafka client with...



Answer : D

All brokers can respond to a Metadata request, so a client can connect to any broker in the cluster and then figure out on its own which brokers to send data to.


Question 7

StreamsBuilder builder = new StreamsBuilder();

KStream textLines = builder.stream("word-count-input");

KTable wordCounts = textLines

.mapValues(textLine -> textLine.toLowerCase())

.flatMapValues(textLine -> Arrays.asList(textLine.split("\W+")))

.selectKey((key, word) -> word)

.groupByKey()

.count(Materialized.as("Counts"));

wordCounts.toStream().to("word-count-output", Produced.with(Serdes.String(), Serdes.Long()));

builder.build();

What is an adequate topic configuration for the topic word-count-output?



Answer : D

Result is aggregated into a table with key as the unique word and value its frequency. We have to enable log compaction for this topic to align the topic's cleanup policy with KTable semantics.


Page:    1 / 14   
Total 150 questions