Confluent Certified Developer for Apache Kafka (CCDAK) Exam Questions
Page content
Comprehensive list of Free Confluent Certified Developer for Apache Kafka (CCDAK) exam questions, grouped by the official exam domains, curated for cracking the exam with confidence.
Disclaimer: Confluent is a trademark of Confluent, Inc. Apache Kafka and Kafka are trademarks of the Apache Software Foundation. These exam questions are neither endorsed by nor affiliated with Confluent or the Apache Software Foundation. These are not the official Confluent Certified Developer for Apache Kafka exam questions/dumps. These questions are created from the Apache Kafka documentation and the Confluent documentation. They cover all 6 domains of the Confluent Certified Developer for Apache Kafka (CCDAK) exam, and once you go through these questions and their concepts, you are more than ready to crack the exam in first attempt.
Free Online Practice Exam
Take all 146 questions as a timed online practice exam, free:-
Overview
- This is the developer certification from Confluent for developers and solution architects who build applications on Apache Kafka: producers and consumers, delivery guarantees (acks, idempotence, transactions), Schema Registry and schema evolution, Kafka Streams, Kafka Connect, and testing and monitoring Kafka applications.
- It suits Java and JVM developers, data engineers and solution architects. Hands-on experience writing Kafka producers, consumers and Kafka Streams applications is strongly recommended.
- Exam code is CCDAK, and passing it earns the Confluent Certified Developer for Apache Kafka credential with a digital badge. The exam costs US$150, is taken online with a remote proctor (Honorlock, in Google Chrome with a webcam), and is available in English.
- Exam duration is 90 minutes, with about 60 questions. Question types include multiple choice, multiple response, matching and list ordering.
- Confluent doesn’t publish the passing score. Results are shown on screen as soon as you finish, and our practice tests use 70% as the target.
- The exam covers 6 domains (see the weighting table below). The credential is valid for 2 years. Apache Kafka 4.x runs only in KRaft mode (ZooKeeper was removed in Kafka 4.0), so the questions use KRaft and
--bootstrap-server, never ZooKeeper. - Confluent Certification, CCDAK exam preparation guide and Apache Kafka documentation for more details.
146 Practice Questions
| # | Domain | Weight | Questions below |
|---|---|---|---|
| 1 | Apache Kafka Fundamentals | 23% | 43 |
| 2 | Apache Kafka Application Development | 28% | 62 |
| 3 | Apache Kafka Streams | 12% | 21 |
| 4 | Kafka Connect | 15% | 7 |
| 5 | Application Testing | 8% | 6 |
| 6 | Application Observability | 13% | 7 |
Domain 1: Apache Kafka Fundamentals (23%)
A topic is created with a replication factor of 3. What does that mean for each of its partitions?
⬜ Each partition is stored on 3 different brokers.
⬜ Each partition is stored on 2 different brokers, plus the leader.
⬜ Each partition is stored on 4 different brokers.
⬜ Three copies of each partition are kept on the same broker.
A topic has replication factor 3 and min.insync.replicas=2, and the producer uses acks=all. What is the largest number of brokers hosting the partition that can be down while the producer can still write?
⬜ 0
⬜ 1
⬜ 2
⬜ 3
A topic has replication factor 3 and min.insync.replicas=2, but the producer is configured with acks=1. How many brokers hosting the partition can fail while the producer can still write?
⬜ 0
⬜ 1
⬜ 2
⬜ 3
A topic has three replicas and min.insync.replicas=2. Two of the three replicas are unavailable. What happens to a produce request sent with acks=all?
⬜ It fails with a NotEnoughReplicas error.
⬜ It succeeds, written only to the single remaining in-sync replica.
⬜ It blocks until one of the unavailable replicas comes back.
A topic has three replicas and min.insync.replicas=2, and two of the replicas are down. A consumer sends a fetch request for the partition. What happens?
⬜ The broker returns NotEnoughReplicasException.
⬜ The data is served by the remaining in-sync replica, which is the leader.
⬜ A new leader is elected before any data is returned.
⬜ An empty batch is always returned.
How do you keep the records of the topic my-topic for only one hour, without affecting any other topic?
⬜ Set the topic configuration retention.ms to 3600000.
⬜ Set the broker configuration log.retention.ms to 3600000.
⬜ Set retention.ms to 3600000 in the producer configuration.
⬜ Set retention.ms to 3600000 in the consumer configuration.
A broker is started with log.retention.hours=168, log.retention.minutes=168 and log.retention.ms=168. How long are records kept?
⬜ 168 minutes
⬜ 168 milliseconds
⬜ The broker refuses to start because the settings conflict
⬜ 168 hours
A topic has cleanup.policy=compact. Which statement about log compaction is true?
⬜ Every record in the topic is compressed.
⬜ After cleaning, at least the latest value for each key is kept.
⬜ After cleaning, only the first value written for each key is kept.
⬜ Compaction renumbers the offsets of the remaining records.
⬜ The broker drops incoming duplicates by hashing their keys on arrival.
A producer writes a record with key K and a null value to a compacted topic. What is the effect?
⬜ The broker ignores the record.
⬜ The producer throws a runtime exception.
⬜ It acts as a tombstone: after cleaning, the records with key K are removed.
⬜ After cleaning, only this null-valued record is removed.
In a compacted topic, which part of a partition’s log can the log cleaner compact?
⬜ Every record, as soon as it is written
⬜ Records as soon as they are flushed to disk
⬜ Only inactive (closed) segments, never the active segment
⬜ Only segments of partitions created after compaction was enabled
On disk, what is a Kafka partition made of?
⬜ One data file
⬜ One data file and one index
⬜ One data file and two indexes
⬜ Segments, each with a log file and two indexes (offset and time)
Can a record be changed after it has been written to a topic?
⬜ Yes
⬜ No
Which statement about the number of partitions in an existing topic is true?
⬜ Partitions can be removed with kafka-topics.sh.
⬜ The number of partitions can never change after creation.
⬜ Partitions are removed when a broker is removed.
⬜ Partitions can be added with kafka-topics.sh --alter.
⬜ Partitions are added automatically when a broker joins the cluster.
Which statements about partitions are true? (select two)
⬜ One replica is the leader and the others are followers.
⬜ A topic can’t have more partitions than there are brokers.
⬜ A broker can store a partition and also its replica on its own disk.
⬜ A broker can store several different partitions of the same topic.
⬜ Only out-of-sync replicas are followers; every in-sync replica is also a leader.
With the default settings (no follower fetching configured), which statement about replicas is true?
⬜ Producers can write to follower replicas.
⬜ Follower replicas serve all consumer fetches.
⬜ Produce and fetch requests are load-balanced between leader and followers.
⬜ The leader replica handles all produce and fetch requests.
Which replica becomes partition leader by default? (select two)
⬜ Any replica, in sync or not
⬜ A replica that is in the in-sync replica set (ISR)
⬜ The preferred leader, when it is in sync and auto.leader.rebalance.enable=true
⬜ The preferred leader, when it is in sync and auto.leader.rebalance.enable=false
Which statements are true for every broker in a Kafka cluster? (select three)
⬜ It holds every topic and every partition.
⬜ It holds only some of the topics and partitions.
⬜ It knows the metadata for all topics and partitions.
⬜ It knows metadata only for the partitions on its own disk.
⬜ It can act as a bootstrap server.
⬜ It is the controller.
Three producers write to a 5-partition topic, and five consumers read from it. How many active controllers does the cluster have?
⬜ 3
⬜ 5
⬜ 1
⬜ 2
In a KRaft-mode cluster, what is true about the active controller? (select two)
⬜ It is elected by a vote of all brokers.
⬜ It is elected by the KRaft controller quorum (Raft).
⬜ It coordinates consumer group rebalances.
⬜ It is responsible for partition leader election.
A KRaft controller quorum has 5 voters. How many controllers can fail while the quorum keeps working?
⬜ 1
⬜ 2
⬜ 3
⬜ 4
In a KRaft-mode cluster, where are dynamic topic configurations and ACLs stored?
⬜ In an internal topic called __topic_configurations
⬜ In ZooKeeper
⬜ In the cluster metadata log (the __cluster_metadata topic)
⬜ In each broker’s server.properties file
Which of the following are NOT stored in the KRaft cluster metadata log? (select two)
⬜ Broker registrations
⬜ ACLs
⬜ Consumer group offsets
⬜ Partition leaders and replica assignments
⬜ Schema Registry schemas
What is required for a broker to join an existing KRaft-mode cluster? (select two)
⬜ All brokers use the same node.id.
⬜ Each broker has a unique node.id.
⬜ All brokers point to the same controller quorum (controller.quorum.bootstrap.servers or controller.quorum.voters).
⬜ Each broker points to its own controller quorum.
A bank processes card payments through Kafka and can’t afford to lose any acknowledged payment. What should unclean.leader.election.enable be set to?
⬜ true
⬜ false
Your manager prefers that a topic stays available for writes even if some data might be lost. Which setting enables this?
⬜ min.insync.replicas
⬜ compression.type
⬜ unclean.leader.election.enable
How do Kafka brokers achieve high throughput between producers and consumers? (select two)
⬜ They buffer records on disk and read them back for every consumer.
⬜ They compress records when writing them to disk.
⬜ They don’t transform the records.
⬜ They convert records into a binary format.
⬜ They use zero-copy transfer straight from the page cache.
Which Kafka optimization is lost when clients connect over an SSL/TLS listener?
⬜ Exactly-once delivery
⬜ Zero-copy transfer
⬜ Cross-cluster mirroring
⬜ Support for Avro data
Every topic in a cluster has replication factor 3. A broker’s disk failed and was replaced; the new log directory was formatted with the same cluster ID, and the broker is restarted. What happens?
⬜ The broker crashes because its data is missing.
⬜ Other topics are deleted because the broker lost its data.
⬜ The broker starts empty and may become leader, causing data loss.
⬜ The broker starts and re-replicates its partitions from the leaders, rejoining the ISR once caught up.
A cluster has 3 brokers. A single-partition topic must survive one broker failure while another broker is down for maintenance. Which replication factor do you choose?
⬜ 2
⬜ 1
⬜ 3
⬜ 6
A cluster has 6 brokers: 0 and 1 in rack A, 2 and 3 in rack B, 4 and 5 in rack C. A new topic has 10 partitions and replication factor 3. Partition 0’s leader is on broker 4 and its first follower on broker 2. Which brokers can hold the last replica? (select two)
⬜ 0
⬜ 1
⬜ 2
⬜ 3
⬜ 5
⬜ 6
What changes when brokers are configured with broker.rack?
⬜ Two brokers can share a node.id if they are in different racks.
⬜ Replicas of a partition are spread across different racks.
⬜ Replicas of a partition are placed in the same rack.
⬜ Each rack holds every topic and partition.
The sales topic is written in the Americas region and mirrored to Europe with MirrorMaker, where it is only read for analytics. What kind of mirroring is this?
⬜ Active-active
⬜ Active-passive
⬜ Passive-passive
A cluster has 5 brokers. A topic has 10 partitions and replication factor 3. A client has a producer quota of producer_byte_rate=1048576 (1 MB/s). What is the most the client can produce in total?
⬜ 0.33 MB/s
⬜ 1 MB/s
⬜ 5 MB/s
⬜ 10 MB/s
The broker has auto.create.topics.enable=true. A producer writes to a topic that doesn’t exist. What happens?
⬜ The topic is created with the broker’s num.partitions and default.replication.factor.
⬜ The topic is created with 1 partition and replication factor 1.
⬜ The topic is created with one partition per broker and replication factor 3.
⬜ The topic is created with partition and replication settings taken from the producer.
With auto.create.topics.enable=true on the brokers, which client actions can lead to a missing topic being created automatically? (select three)
⬜ A producer sends a record to the topic.
⬜ A client changes the number of partitions of the topic.
⬜ A consumer subscribes to the topic and fetches from it.
⬜ A client requests metadata for the topic.
What is the main drawback of point-to-point request/response communication compared with event streaming through Kafka?
⬜ Reliability
⬜ Cost
⬜ Coupling
⬜ Scalability
Since Kafka 0.10.2, how do client and broker versions interact?
⬜ A newer client can talk to a newer broker, but an older client can’t.
⬜ An older client can talk to a newer broker, but a newer client can’t talk to a newer broker.
⬜ Newer clients can talk to older brokers and older clients can talk to newer brokers, within the supported protocol versions.
⬜ Clients and brokers must run exactly the same version.
A topic has replication factor 3 and min.insync.replicas=1. What is the largest number of brokers hosting a partition that can be down while a producer with acks=all can still write to it?
⬜ 0
⬜ 1
⬜ 2
⬜ 3
Each instance of a consumer application can process 50 MB/s, and the topic must be consumed at 1 GB/s by one consumer group. What is the minimum number of partitions the topic needs?
⬜ 10
⬜ 20
⬜ 1
⬜ 50
A producer worked on one developer’s machine. After copying it to a colleague’s machine, it connects to Kafka but fails to write to the same topic with an authorization error. What is the likely cause?
⬜ A producer application can’t be copied between machines.
⬜ The broker configuration must be changed to allow another producer.
⬜ The topic’s ACL allows only the first machine’s host (IP address).
⬜ The broker must be restarted.
Which of the following is NOT an authentication mechanism supported by Kafka?
⬜ SSL (TLS client certificates)
⬜ SASL/GSSAPI (Kerberos)
⬜ SASL/SCRAM
⬜ SAML
Which protocol do clients use to connect securely to the Confluent REST Proxy?
⬜ HTTP
⬜ HTTPS (TLS)
⬜ SASL
⬜ Kerberos
Which command creates a topic named test with 3 partitions and 3 replicas?
⬜ kafka-topics.sh --create --broker-list localhost:9092 --replication-factor 3 --partitions 3 --topic test
⬜ kafka-topics-create.sh --bootstrap-server localhost:9092 --replication-factor 3 --partitions 3 --topic test
⬜ kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 3 --partitions 3 --topic test
⬜ kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 3 --partitions 3 --topic test
Domain 2: Apache Kafka Application Development (28%)
A producer sends log lines without any key. Which properties must be set in its configuration? (select three)
⬜ partition
⬜ bootstrap.servers
⬜ key
⬜ value
⬜ key.serializer
⬜ value.serializer
Which producer setting most increases the chance that records are batched together?
⬜ Increase batch.size
⬜ Increase the number of producer threads
⬜ Increase linger.ms
⬜ Increase message.max.bytes
A producer sends at a very high rate and every batch is already full. How can you increase its throughput? (select two)
⬜ Enable compression
⬜ Increase batch.size
⬜ Decrease batch.size
⬜ Increase linger.ms
⬜ Disable compression
⬜ Decrease linger.ms
From a producer’s point of view, which of these errors are retriable? (select two)
⬜ UNKNOWN_TOPIC_OR_PARTITION
⬜ NOT_LEADER_OR_FOLLOWER
⬜ MESSAGE_TOO_LARGE
⬜ INVALID_REQUIRED_ACKS
A producer has enable.idempotence=false, retries enabled, and max.in.flight.requests.per.connection raised above 1. What is the risk?
⬜ Lower throughput
⬜ At-least-once delivery is no longer guaranteed
⬜ Records can arrive out of order
⬜ The producer becomes less resilient
In the Java client, what does producer.send(record) return?
⬜ A Boolean showing whether the send succeeded
⬜ Nothing (void)
⬜ A Future<RecordMetadata>
⬜ A Future<ProducerRecord>
You send keyed records to a topic and increase its partition count to get more throughput. What happens? (select two)
⬜ Existing records are rebalanced across the new set of partitions.
⬜ Existing records stay in their current partitions.
⬜ New records with a given key keep going to the partition that holds that key’s old records.
⬜ New records for a key may go to a different partition than before.
⬜ The partition count can’t be changed after creation.
When is onCompletion() called in this producer code?
private class ProducerCallback implements Callback {
@Override
public void onCompletion(RecordMetadata metadata, Exception e) {
if (e != null) {
e.printStackTrace();
}
}
}
ProducerRecord<String, String> record =
new ProducerRecord<>("topic1", "key1", "value1");
producer.send(record, new ProducerCallback());
⬜ As soon as send() is called
⬜ When the record has been serialized
⬜ When the record has been partitioned and added to a batch
⬜ When the broker’s response is received (or the send fails)
A producer using the default partitioner sends records with a null key to a topic with 6 partitions. Where are they written?
⬜ To any of the partitions
⬜ To the partition reserved for null keys
⬜ Always to partition 0
⬜ Always to partition 5
A producer with default size settings sends a 3 MB record. How is it handled?
⬜ The producer splits it into message.max.bytes-sized chunks and sends them in order.
⬜ The producer splits it into max.request.size-sized chunks and sends them in order.
⬜ A RecordTooLargeException is raised and the producer retries until its retries run out.
⬜ A RecordTooLargeException is raised immediately, without retries.
An orders topic uses the customer name as the key. One customer, ABC, sends far more orders than the rest, and you want a partition reserved for ABC alone, with everyone else spread over the other partitions. How?
⬜ It can’t be done: a partition always mixes keys.
⬜ Write a custom partitioner.
⬜ Add metadata to the producer record.
⬜ Define a routing rule on the broker.
Which producer setting prevents duplicates caused by network retries?
⬜ retries=200000
⬜ enable.idempotence=true
⬜ max.in.flight.requests.per.connection=1
⬜ batch.size=1
A producer calls producer.send(record).get() for every record. What is the effect?
⬜ Better compression
⬜ Bigger batches
⬜ Lower throughput
⬜ Every broker in the cluster must acknowledge the record
A producer is configured with compression.type=snappy and the topic keeps its default compression.type=producer. What happens? (select two)
⬜ The brokers decompress the data.
⬜ The consumers decompress the data.
⬜ The brokers compress the data.
⬜ The producer compresses the data.
⬜ The consumers compress the data.
What does a producer need to be given in order to write to a topic?
⬜ The address of any broker in the cluster and the topic name
⬜ Any broker, the topic name and the list of partitions
⬜ The address of every broker in the cluster and the topic name
⬜ The brokers that host the data, the topic name and the partition list
You need very high confidence that both the leader and its followers have each record. Which configuration do you choose?
⬜ acks=1, replication factor 3, min.insync.replicas=2
⬜ acks=all, replication factor 2, min.insync.replicas=1
⬜ acks=all, replication factor 3, min.insync.replicas=1
⬜ acks=all, replication factor 3, min.insync.replicas=2
Which producer setting gets an acknowledgement from the partition leader only?
⬜ acks=1
⬜ acks=0
⬜ acks=all
What does producing records with a key let you do?
⬜ Add more information to each record
⬜ Influence which partition the records go to
⬜ Let a consumer subscribe to a (topic, key) pair and read only that key
⬜ Apply security per record
Which statements are correct? (select three)
⬜ acks is a topic setting.
⬜ acks is a producer setting.
⬜ min.insync.replicas is a topic (or broker) setting.
⬜ min.insync.replicas is a producer setting.
⬜ min.insync.replicas only takes effect when acks=all.
⬜ min.insync.replicas applies whatever acks is set to.
Which exceptions can be caught by the try block around this send() call? (select two)
ProducerRecord<String, String> record =
new ProducerRecord<>("topic1", "key1", "value1");
try {
producer.send(record);
} catch (Exception e) {
e.printStackTrace();
}
⬜ SerializationException
⬜ BrokerNotAvailableException
⬜ InvalidPartitionsException
⬜ BufferExhaustedException
Which statements about thread safety in the Java Kafka clients are true? (select two)
⬜ A producer instance must be used by only one thread.
⬜ A consumer instance can safely be shared by several threads.
⬜ A producer instance can safely be shared by several threads.
⬜ A consumer instance must be used by only one thread.
A producer writes to a partition with replication factor 2 whose leader is on broker 1. Broker 1 goes down. What happens?
⬜ The producer stops working.
⬜ The topic becomes unavailable.
⬜ The producer automatically writes to the replica that is elected as the new leader.
Which combination uniquely identifies a record that a consumer receives?
⬜ Topic and timestamp
⬜ Topic, partition and timestamp
⬜ Topic, partition and offset
How can one consumer subscribe to the topics topic.history, topic.sports and topic.politics at the same time? (select two)
⬜ consumer.subscribe(Arrays.asList("topic.history", "topic.sports", "topic.politics"));
⬜ consumer.subscribe(Pattern.compile("topic\\..*"));
⬜ Three calls: consumer.subscribe("topic.history");, consumer.subscribe("topic.sports");, consumer.subscribe("topic.politics");
⬜ consumer.subscribePrefix("topic.");
An orders topic with 4 partitions must be processed independently by two applications: order fulfilment and monitoring. How do you organize the consumers for the best performance and resource use?
⬜ One group of 4 consumers: two for fulfilment and two for monitoring
⬜ Two consumer groups, one per application, with 4 consumers each
⬜ One group of 8 consumers, 4 for each application
⬜ Two consumer groups, one per application, with 8 consumers each
Consumers C1 and C2 in group G subscribe to topics T1 and T2, each with 3 partitions, using the RoundRobinAssignor. How are the partitions assigned?
⬜ C1 gets partitions 0 and 1 of T1 and T2; C2 gets partition 2 of T1 and T2.
⬜ C1 gets partitions 0 and 2 of T1 and partition 1 of T2; C2 gets partition 1 of T1 and partitions 0 and 2 of T2.
⬜ Two consumers can’t read from two topics at the same time.
⬜ Every consumer reads every partition.
A consumer must read from one specific partition of a topic. How is this done?
⬜ Call subscribe(String topic, int partition) with the topic and partition number
⬜ Call assign() with a TopicPartition
⬜ Call subscribe() with a TopicPartition
A consumer runs the code below to read partitions 0 and 1 of topic1. What happens?
consumer.subscribe(Arrays.asList("topic1"));
List<TopicPartition> pc = new ArrayList<>();
pc.add(new TopicPartition("topic1", 0));
pc.add(new TopicPartition("topic1", 1));
consumer.assign(pc);
⬜ It works: subscribe() joins the topic and assign() picks the partitions.
⬜ It throws an IllegalStateException.
A client fetches from a broker and gets a NotLeaderOrFollower error for the partition. How does the client recover?
⬜ It sends the fetch request to every broker in the cluster.
⬜ It asks ZooKeeper which broker hosts the leader.
⬜ It asks the controller for the leader and connects to it.
⬜ It sends a metadata request to a broker, then sends the request to the new leader.
A consumer starts with auto.offset.reset=latest. The partition holds offsets 45 to 2311, and the group has committed offset 643. Where does the consumer start reading?
⬜ Offset 45
⬜ Offset 643
⬜ Offset 2311
⬜ It crashes
A consumer starts with auto.offset.reset=none. The partition now holds offsets 45 to 2311, but the group’s committed offset is 10. Where does it start reading?
⬜ Offset 45
⬜ Offset 10
⬜ Offset 2311
⬜ It throws an exception instead of choosing a position
A consumer group that has never committed offsets starts reading a partition holding offsets 45 to 2311, with auto.offset.reset=latest. Where does it start?
⬜ Offset 45
⬜ Offset 0
⬜ Offset 2311 (the end of the log)
⬜ It crashes
A consumer asks to commit offset 2000, but the request is lost in a network glitch and never answered. Meanwhile it processes another batch and commits offset 3000 successfully. What should you do?
⬜ Nothing
⬜ Commit offset 2000 for the group manually with kafka-consumer-groups.sh
⬜ Restart the consumer
⬜ Add another consumer to the group
How does a consumer commit its offsets?
⬜ It writes a record directly to the __consumer_offsets topic.
⬜ It sends the commit to the group coordinator broker.
⬜ It writes the offsets to ZooKeeper.
A producer writes with acks=1, so the leader has the record but the followers don’t yet. When can a consumer read it?
⬜ Immediately
⬜ Only after every replica has it
⬜ Once the high watermark has moved past it
⬜ Never; the produce request fails
Which actions trigger a partition rebalance in a consumer group? (select three)
⬜ A new consumer joins the group.
⬜ A consumer in the group shuts down.
⬜ Partitions are added to a subscribed topic.
⬜ A broker is added to the cluster.
⬜ A broker is removed from the cluster.
A consumer runs heavy machine-learning calculations that take about 6 minutes per batch, and it keeps being removed from the group even though it is still running. What fixes this?
⬜ Increase session.timeout.ms to 600000
⬜ Increase heartbeat.interval.ms to 600000
⬜ Increase max.poll.interval.ms to 600000
⬜ Keep adding consumers to the group and killing them
Three producers write to a topic with 5 partitions. Ten consumers read it in the same consumer group. How many consumers are idle?
⬜ 3
⬜ 5
⬜ 10
⬜ None
Consumer metrics show a very high fetch-rate, and each fetch returns very little data. How do you improve throughput?
⬜ Increase fetch.max.bytes
⬜ Decrease fetch.max.bytes
⬜ Increase fetch.min.bytes
⬜ Decrease fetch.min.bytes
Which setting lets restarted consumers in a group continue from the offsets the group last committed?
⬜ auto.offset.reset
⬜ group.id
⬜ value.deserializer
⬜ enable.auto.commit
Two consumers use the same group.id. What does each of them read?
⬜ All data from all partitions
⬜ Separate ranges of offsets within every partition
⬜ All the data of its own partitions, with no partition shared
A consumer with enable.auto.commit=false calls close(). What happens?
⬜ It leaves the group, and a rebalance starts right away.
⬜ The coordinator notices the missing heartbeats and rebalances after session.timeout.ms.
⬜ Its uncommitted offsets are committed.
How do you make a consumer stop polling immediately and shut down cleanly?
⬜ Call consumer.wakeup() from another thread and catch the WakeupException
⬜ Kill the consumer thread
⬜ Call consumer.poll() from another thread
A group of 12 consumers uses the classic group protocol. When a consumer is killed abruptly without a clean shutdown, the rebalance only starts after about 45 seconds. The business wants it within a few seconds. What do you change? (select two)
⬜ Increase session.timeout.ms
⬜ Decrease session.timeout.ms
⬜ Increase heartbeat.interval.ms
⬜ Decrease heartbeat.interval.ms
⬜ Increase max.poll.interval.ms
⬜ Decrease max.poll.interval.ms
A consumer fails to process record 10 but processes record 11 successfully. What should it do to keep at-least-once processing?
⬜ Commit offset 11
⬜ Commit offset 10
⬜ Not commit until record 10 has been processed
You want at-most-once processing in a consumer. Which offset commit strategy do you choose?
⬜ Store offsets on local disk after processing the records
⬜ Commit offsets to Kafka after processing the records
⬜ Commit offsets to Kafka right after poll(), before processing the records
⬜ Don’t commit offsets and always read from the beginning
Which delivery guarantee does this consumer provide?
while (true) {
ConsumerRecords<String, String> records = consumer.poll(Duration.ofMillis(100));
try {
consumer.commitSync();
} catch (CommitFailedException e) {
log.error("commit failed", e);
}
for (ConsumerRecord<String, String> record : records) {
System.out.printf("topic = %s, partition = %s, offset = %d, key = %s, value = %s%n",
record.topic(), record.partition(), record.offset(), record.key(), record.value());
}
}
⬜ Exactly-once
⬜ At-most-once
⬜ At-least-once
A client sends binary data to the topic test_binary through the REST Proxy, base64-encoded as required. What does a consumer reading the topic directly with a Kafka client receive?
⬜ Base64 data that it must decode
⬜ Binary data
⬜ JSON data
⬜ Avro data
To send binary data through the REST Proxy it must be base64-encoded. Which component does the encoding?
⬜ The client application producing through the REST Proxy
⬜ The REST Proxy
⬜ The Kafka broker
⬜ The controller
Which protocols can clients use to talk to Schema Registry? (select two)
⬜ HTTP
⬜ HTTPS
⬜ SASL
⬜ WebSocket
⬜ JDBC
A consumer uses KafkaAvroDeserializer. What happens when a record’s schema isn’t in the deserializer’s local cache?
⬜ It throws a deserialization error
⬜ It fetches the schema from Schema Registry by its ID
⬜ It fails silently
⬜ It throws a SerializationException
Where does Confluent Schema Registry store schemas?
⬜ In an embedded SQL database
⬜ In the _schemas Kafka topic
⬜ Inside each record’s bytes
⬜ In a ZooKeeper node
A producer sends Avro data with Schema Registry integration. After an incompatible schema change, the data is rejected. Which component rejects it?
⬜ The producer itself
⬜ Confluent Schema Registry
⬜ The Kafka broker
⬜ The controller
Which of these is NOT a feature of Confluent Schema Registry?
⬜ Storing schemas
⬜ Enforcing compatibility rules
⬜ Storing Avro data
In Avro, adding a field without a default value to a record is a __ schema change.
⬜ backward
⬜ forward
⬜ breaking
⬜ full
In Avro, removing a field that has no default value is a __ schema change.
⬜ backward
⬜ forward
⬜ breaking
⬜ full
In Avro, adding or removing a field that has a default value is a __ schema change.
⬜ backward
⬜ forward
⬜ breaking
⬜ full
In Avro, adding a new symbol to an enum that has no default is a __ schema change.
⬜ backward
⬜ forward
⬜ full
⬜ not compatible in either direction
Which of these is NOT an Avro primitive type?
⬜ null
⬜ string
⬜ date
⬜ long
⬜ int
Which attributes of an Avro record schema are optional? (select two)
⬜ name
⬜ namespace
⬜ fields
⬜ doc
How are Avro SpecificRecord classes created in Java?
⬜ Generated from an Avro schema by a Maven or Gradle plugin
⬜ Generated automatically from an Avro schema at runtime
⬜ Written by hand by the developer
In Confluent Platform, where does Schema Registry run?
⬜ As an in-memory plugin on the Kafka brokers
⬜ As an in-memory plugin on the controllers
⬜ As an in-memory plugin on the Kafka Connect workers
⬜ As a separate JVM process
Domain 3: Apache Kafka Streams (12%)
Each time a record arrives on a KStream, you want to look up the current value for its key in a KTable. What does a KStream-KTable join produce?
⬜ A KStream
⬜ A KTable
⬜ A GlobalKTable
⬜ Either a KStream or a KTable, as you choose
Which of these event-processing applications are stateless? (select two)
⬜ Reading log events and routing ERROR events to a high-priority stream and all others to a low-priority stream
⬜ Finding the daily minimum and maximum price of each stock
⬜ Reading events and converting them from JSON to Avro
⬜ Publishing the top 10 stocks of each day
Which Kafka Streams DSL operations are stateful? (select four)
⬜ peek
⬜ aggregate
⬜ flatMap
⬜ count
⬜ reduce
⬜ join
A Kafka Streams application runs in a container on Kubernetes. After each restart it takes a long time to rebuild its state before processing again. What speeds up restarts the most?
⬜ Mount a persistent volume for the RocksDB state directory
⬜ Add partitions to the input topics
⬜ Increase the number of stream threads
⬜ Reduce the Streams cache size
Kafka Streams’ exactly-once guarantee covers which flow of data?
⬜ Kafka to Kafka
⬜ External system to Kafka
⬜ Kafka to external system
An online shop has a high-volume purchase topic with 5 partitions and a low-volume customer topic with 3 partitions. You want to join each purchase with its customer. What is the best approach?
⬜ Repartition purchase into 3 partitions
⬜ Repartition customer into 5 partitions
⬜ Do a KStream-KTable join after a repartition step
⬜ Read customer as a GlobalKTable
Which Kafka Streams join is always windowed?
⬜ KStream-KStream join
⬜ KTable-KTable join
⬜ KStream-KTable join
⬜ KStream-GlobalKTable join
Which configuration suits the output topic word-count-output of this application?
StreamsBuilder builder = new StreamsBuilder();
KStream<String, String> textLines = builder.stream("word-count-input");
KTable<String, Long> wordCounts = textLines
.mapValues(line -> line.toLowerCase())
.flatMapValues(line -> Arrays.asList(line.split("\\W+")))
.selectKey((key, word) -> word)
.groupByKey()
.count(Materialized.as("Counts"));
wordCounts.toStream().to("word-count-output", Produced.with(Serdes.String(), Serdes.Long()));
⬜ compression.type=lz4
⬜ cleanup.policy=compact
⬜ cleanup.policy=delete
⬜ max.message.bytes=10000000
A shoe shop builds a Kafka Streams application. Which data fits best as a KTable? (select two)
⬜ The stream of sales transactions
⬜ The current inventory
⬜ The total revenue so far
⬜ Returned items
What should you use to transform data from one Kafka topic into another?
⬜ A Kafka Connect source connector
⬜ A Kafka Connect sink connector
⬜ Kafka Streams
⬜ A consumer and producer pair
In Kafka Streams, what prefix do internal topics get?
⬜ kafka-streams-
⬜ The application.id
⬜ The group.id
⬜ tasks-<number>
You want the average of all events over the last five minutes, updated every minute. Which window type do you use?
⬜ Tumbling window
⬜ Sliding window
⬜ Hopping window
⬜ Session window
Which of these joins does not need the input data to be co-partitioned?
⬜ KStream-KStream join
⬜ KTable-KTable join
⬜ KStream-KTable join
⬜ KStream-GlobalKTable join
Which Kafka Streams DSL operations are stateless? (select five)
⬜ split (branching)
⬜ map
⬜ flatMap
⬜ aggregate
⬜ filter
⬜ groupBy
A Kafka Streams application reads one input topic with 5 partitions. You run 5 instances, each with num.stream.threads=5. How many stream tasks are created, and how many of the 25 threads get a task?
⬜ 25 tasks; all 25 threads busy
⬜ 25 tasks; 5 threads busy
⬜ 5 tasks; 5 threads busy and 20 idle
⬜ 5 tasks; 1 thread busy
An online shop sells custom-made products. What is the natural way to model its data in Kafka Streams?
⬜ Purchases, products and customers all as streams
⬜ Purchases as a stream, products as a table, customers as a stream
⬜ Purchases as a stream, products as a table, customers as a table
⬜ Purchases, products and customers all as tables
Which Java library is ksqlDB built on?
⬜ Kafka Streams
⬜ Kafka Connect
⬜ Schema Registry
⬜ REST Proxy
Is ksqlDB’s SQL dialect ANSI SQL compliant?
⬜ Yes
⬜ No
Which port does a ksqlDB server listen on by default?
⬜ 2181
⬜ 9092
⬜ 8083
⬜ 8088
How do you make a ksqlDB query read all records in a topic, from the beginning?
⬜ You can’t; ksqlDB always reads from the end.
⬜ ksqlDB reads from the beginning by default.
⬜ Set auto.offset.reset to earliest (SET 'auto.offset.reset'='earliest';)
Where does ksqlDB keep the metadata for its streams, tables and queries?
⬜ In ZooKeeper
⬜ In a Kafka topic (the command topic)
⬜ In a PostgreSQL database
⬜ In Schema Registry
Domain 4: Kafka Connect (15%)
You want to sink a topic to S3 with Kafka Connect. The cluster has 10 brokers; the topic has 2 partitions and replication factor 3. How many tasks should the S3 sink connector have?
⬜ 3
⬜ 2
⬜ 6
⬜ 10
A JDBC source connector copies 3 tables into 3 topics. It has tasks.max=2 and runs on a cluster of 3 workers. How many tasks run?
⬜ 1
⬜ 2
⬜ 3
⬜ 6
A JDBC source connector copies a single table into a topic, with tasks.max=2 on a 3-worker cluster. How many tasks run?
⬜ 1
⬜ 2
⬜ 3
⬜ 6
Which of these is NOT an internal Kafka Connect topic?
⬜ connect-configs
⬜ connect-status
⬜ connect-offsets
⬜ connect-jars
What should you use to import data from an external database into Kafka?
⬜ A Kafka Connect source connector
⬜ A Kafka Connect sink connector
⬜ Kafka Streams
⬜ The Confluent REST Proxy
What should you use to continuously export data from Kafka into a target database?
⬜ A Kafka Connect source connector
⬜ A Kafka Connect sink connector
⬜ Kafka Streams
⬜ A Kafka producer
A connector reading plain JSON fails with: JsonConverter with schemas.enable requires "schema" and "payload" fields and may not contain additional fields. How do you fix it?
⬜ Use the AvroConverter for keys and values, with the Schema Registry URL
⬜ Add schema and payload fields with a Single Message Transform
⬜ Set key.converter.schemas.enable and value.converter.schemas.enable to false
⬜ Use the JsonConverter for keys and values, with the Schema Registry URL
Domain 5: Application Testing (8%)
You want fast unit tests for a Kafka Streams topology, without starting a Kafka cluster. What do you use?
⬜ TopologyTestDriver from the kafka-streams-test-utils artifact
⬜ An embedded ZooKeeper with one broker
⬜ MockProducer feeding the input topic of a running application
⬜ The kafka-console-producer.sh tool against a test cluster
In a TopologyTestDriver test, how do you send records into the topology and read its results?
⬜ Create a KafkaProducer and a KafkaConsumer pointing at localhost:9092
⬜ Create a TestInputTopic and a TestOutputTopic from the driver with the matching serializers and deserializers
⬜ Call process() on each processor node directly
⬜ Write records into the state store and read the changelog topic
A topology schedules a punctuation with PunctuationType.WALL_CLOCK_TIME. How do you trigger it in a TopologyTestDriver test?
⬜ Wait for the real time to pass with Thread.sleep()
⬜ Call driver.advanceWallClockTime(...)
⬜ Pipe a record with a later timestamp
⬜ Restart the driver
You want to unit test code that sends records with a Producer, and check what it sent without a broker. What do you use?
⬜ MockProducer, then inspect its history()
⬜ A KafkaProducer with acks=0
⬜ TopologyTestDriver
⬜ A KafkaProducer with bootstrap.servers left empty
You want to unit test a poll loop that uses a Consumer, feeding it chosen records without a broker. What do you use?
⬜ MockProducer
⬜ MockConsumer, assigning partitions, setting beginning offsets and adding records with addRecord()
⬜ TopologyTestDriver
⬜ A KafkaConsumer with auto.offset.reset=none
An integration test must check that producers and consumers work with a real broker, including serialization and consumer group behavior. What is a common approach?
⬜ Use TopologyTestDriver
⬜ Use MockProducer and MockConsumer
⬜ Start a real Kafka broker in a container (for example with Testcontainers) for the test
⬜ Point the test at the production cluster
Domain 6: Application Observability (13%)
You build a consumer application that must process events in near real time. Which metric matters most to watch?
⬜ UnderReplicatedPartitions
⬜ BytesInPerSec
⬜ MessagesInPerSec
⬜ records-lag-max
How do you list every partition where one or more replicas are not in sync with the leader?
⬜ kafka-topics.sh --bootstrap-server localhost:9092 --describe --under-replicated-partitions
⬜ kafka-topics.sh --bootstrap-server localhost:9092 --describe --unavailable-partitions
⬜ kafka-topics.sh --broker-list localhost:9092 --describe --under-replicated-partitions
⬜ kafka-topics.sh --zookeeper localhost:2181 --describe --under-replicated-partitions
How do you find every partition that currently has no leader?
⬜ kafka-topics.sh --bootstrap-server localhost:9092 --describe --under-replicated-partitions
⬜ kafka-topics.sh --bootstrap-server localhost:9092 --describe --unavailable-partitions
⬜ kafka-topics.sh --broker-list localhost:9092 --describe --under-replicated-partitions
⬜ kafka-topics.sh --zookeeper localhost:2181 --describe --unavailable-partitions
Which Kafka CLI tool do you use to read records from a topic?
⬜ kafka-console
⬜ kafka-console-consumer
⬜ kafka-consumer-groups
⬜ kafka-topics
With default options, which consumer group does kafka-console-consumer use?
⬜ It doesn’t use a group ID.
⬜ Always the same group ID.
⬜ A randomly generated group ID.
How do you check, from the command line, how far each consumer in the group orders-app is behind on each partition?
⬜ kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic orders
⬜ kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group orders-app
⬜ kafka-console-consumer.sh --bootstrap-server localhost:9092 --group orders-app
⬜ kafka-configs.sh --bootstrap-server localhost:9092 --describe --entity-type groups
A producer’s JMX metrics show a steadily rising record-error-rate. What does it tell you?
⬜ Records are being sent faster than the brokers can accept them
⬜ Sends are failing after all retries, so records are being lost unless the application handles the errors
⬜ Consumers are failing to deserialize the records
⬜ The producer is retrying, but every record is eventually written
Take all 146 questions as a timed online practice exam, free:-
Related Posts
- Apache Kafka CCDAK Exam Notes — study notes for the CCDAK exam: brokers, topics, producers, consumers, Kafka Streams and Schema Registry
- Apache Kafka Producer Using Java — write a Kafka producer with the Java client
- Apache Kafka Consumer Using Java — write a Kafka consumer with the Java client
- Configure Kafka Producer and Consumer in Spring Boot — Kafka clients in a Spring Boot application
- Certified Kubernetes Application Developer (CKAD) Exam Questions — another hands-on developer certification, often used to run Kafka applications



