Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Confluent Certified Developer for Apache Kafka CCDAK Exam Questions

Last updated: · 11 practice questions with answers and explanations

Page: 1 / 15 Total 150 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Apache Kafka® Fundamentals

Skill tested: Evaluates partition leadership, replication, and acknowledgment trade-offs for durable event production.

A payment platform writes transaction events to a topic with a replication factor of three. The team requires that a producer receive success only when all in-sync replicas have accepted a record, and it must prevent writes when fewer than two replicas remain in sync. A broker outage should not silently reduce the durability guarantee. Which configuration best meets these requirements?

Correct Answer: C. Set producer acks=all and broker min.insync.replicas=2.
Explanation:

With acks=all (also expressed as acks=-1), the leader waits for the current in-sync replicas to acknowledge the write. Setting min.insync.replicas=2 makes the broker reject such writes when fewer than two replicas are in sync, preserving the stated durability floor. acks=1 waits only for the leader, while acks=0 provides no broker acknowledgment. A minimum of one would allow writes with only the leader in the in-sync set, contrary to the requirement.

Question 2

New Single answer

Topic: Apache Kafka® Fundamentals

Skill tested: Assesses partition-key selection for per-entity ordering and scalable Kafka topic distribution.

An order-processing service publishes order lifecycle events to a topic. Consumers must observe each order's events in their original order, but unrelated orders should be processed concurrently across many partitions. The event schema always includes an immutable order identifier. The team does not require a global ordering across all orders, and it wants Kafka to distribute the load rather than sending every event to one partition. What should the producer use as the record key?

Correct Answer: B. The order identifier, so events for one order map to the same partition.
Explanation:

Using the stable order identifier as the key routes records for that order to the same partition, where Kafka preserves their append order. Different order identifiers can map to different partitions and be processed concurrently. A constant key would unnecessarily serialize all orders on one partition. Random or null keys do not reliably keep one order's events together, and consumer-side sorting cannot reconstruct a dependable per-order sequence if records are distributed across partitions.

Question 3

New Multiple answers

Topic: Apache Kafka® Fundamentals

Skill tested: Evaluates consumer-group offset commits, replay behavior, and safe handling of processing failures.

A data ingestion application reads records in a consumer group and writes each result to an external system. A crash after a record is processed but before its offset is committed may cause the record to be processed again. The external system supports an idempotency key derived from the Kafka topic, partition, and offset, but it does not participate in a Kafka transaction. The team wants to avoid losing records and make retries safe. Select TWO actions that best satisfy the requirement.

Correct Answer: A. Disable automatic offset commits and commit offsets only after the corresponding external write succeeds.; E. Use the topic-partition-offset tuple as the external system's idempotency key.
Explanation:

Committing only after a successful external write gives at-least-once processing: a crash before the commit can lead to a retry, but it does not advance the group past an unprocessed record. A stable topic-partition-offset idempotency key lets the external system recognize and suppress that repeated write. Committing first can lose work if the process fails before writing. auto.offset.reset applies when no valid committed offset exists, not as a general crash-recovery policy, and additional threads do not provide exactly-once effects.

Question 4

New Single answer

Topic: Apache Kafka® Application Development

Skill tested: Assesses producer callback error handling and reliable asynchronous record delivery.

A telemetry producer sends records asynchronously to avoid blocking its request-handling thread. During a broker interruption, the application reports success as soon as send() returns, even though some records later fail after retries. The service must retain asynchronous throughput but must not report a record as delivered until the producer has received its delivery result. It cannot block the request thread waiting for each record. Which change best addresses this?

Correct Answer: D. Provide a producer callback and update delivery status when the callback completes.
Explanation:

KafkaProducer.send() is asynchronous; a successful method return generally means the record was accepted into the producer's workflow, not that the broker acknowledged it. A callback reports the eventual result while allowing the calling thread to continue, matching the throughput constraint. Calling Future.get() on that thread would block it. acks=0 removes broker acknowledgment, and larger batches affect batching efficiency rather than turning the initial send() return into a delivery confirmation.

Question 5

New Multiple answers

Topic: Apache Kafka® Application Development

Skill tested: Evaluates consumer polling, group membership, and offset-reset behavior during application startup.

A newly deployed analytics consumer joins an existing consumer group. It must process all records still retained in the topic when it has no committed offset, then continue with new records. Its processing time varies, and the application must keep group membership healthy while work proceeds. The team wants to avoid acknowledging records before processing finishes. Select TWO configuration or implementation choices that meet these requirements.

Correct Answer: C. Continue calling poll() within the configured max.poll.interval.ms while coordinating processing and commits safely.; D. Set auto.offset.reset=earliest for partitions where the group has no valid committed offset.
Explanation:

auto.offset.reset=earliest applies when the group has no valid committed offset and starts consumption at the earliest available retained records. It does not override an existing valid commit. Regular polling is necessary for group coordination; if processing prevents poll() from being called longer than max.poll.interval.ms, the member can be considered failed and partitions reassigned. latest would skip retained backlog for a group without offsets, while committing before processing risks losing records after a failure.

Question 6

New Single answer

Topic: Apache Kafka® Application Development

Skill tested: Assesses Kafka transaction configuration for atomic output records and consumed-offset commits.

A stream-processing service consumes input records and produces derived records to another Kafka topic. A downstream consumer configured with read_committed must not see partial output if the service fails, and the input offsets must advance atomically with the output records. The service uses one producer instance for the processing task and can retry an aborted batch. Which approach should it use?

Correct Answer: D. Configure a transactional.id, initialize transactions, and include consumed offsets in the transaction before committing it.
Explanation:

Kafka transactions can atomically commit produced records and consumed offsets when the application uses a transactional producer. It must configure a transactional.id, initialize transactions, begin a transaction, produce output, send the relevant consumer offsets to that transaction, and commit; failures can abort it. read_committed consumers then exclude aborted transactional output. Idempotence alone does not atomically coordinate offsets and output, and committing offsets separately can leave either missing output or duplicated processing.

Question 7

New Single answer

Topic: Apache Kafka® Application Development

Skill tested: Evaluates partition reassignment handling and consumer subscription strategies in group-based applications.

A service currently assigns specific topic partitions to each consumer by calling assign(). After the topic gains partitions, new application instances start but do not receive those partitions automatically. The team wants Kafka's group coordinator to distribute partitions, rebalance membership changes, and make newly added partitions available without maintaining a custom assignment map. Which implementation change is most appropriate?

Correct Answer: C. Replace manual assign() calls with subscribe() to the topic or a matching subscription pattern.
Explanation:

subscribe() registers the consumer with a group and allows the group coordinator to assign partitions and rebalance when members or topic partitions change. Manual assign() bypasses this automatic group assignment behavior, so adding instances or partitions does not itself create a coordinator-managed reassignment. Offset-reset policy controls where consumption begins when no valid offset exists; poll batch size and automatic commit settings do not change how partitions are assigned.

Question 8

New Single answer

Topic: Apache Kafka® Streams

Skill tested: Assesses Kafka Streams key selection and repartitioning requirements for joins.

A fraud-detection application uses Kafka Streams to join a transaction stream with a customer-risk table. Transactions are keyed by transaction ID, while the table is keyed by customer ID, and each transaction contains the corresponding customer ID in its value. The join must match records by customer ID and preserve the ability to scale processing across partitions. What is the best design?

Correct Answer: C. Rekey transactions by customer ID before the join, allowing Kafka Streams to repartition as required.
Explanation:

Kafka Streams joins depend on records being keyed compatibly so matching records are colocated by key. Re-keying the transaction stream by customer ID aligns it with the table's key; Kafka Streams can create a repartition topic to redistribute the stream when required. Joining on transaction ID cannot match a table keyed by customer ID. Timestamps determine event time, not partition placement, and adding threads does not alter keys or automatically align the inputs.

Question 9

New Multiple answers

Topic: Apache Kafka® Streams

Skill tested: Evaluates event-time windowing, late-arrival handling, and stream-table join semantics.

A monitoring application aggregates sensor readings into five-minute event-time windows. Network delays can deliver readings up to two minutes late, and the team wants to accept those readings before closing a window. Separately, a stream of readings must be enriched with the latest known device metadata, where metadata updates should be reflected as they arrive. Which TWO Kafka Streams design choices fit these requirements?

Correct Answer: C. Use a stream-table join for readings and the metadata table so each reading is enriched using current table state.; D. Configure the window with a two-minute grace period for late records.
Explanation:

A two-minute grace period allows late events to update a five-minute event-time window during the configured lateness interval; records arriving after the window is closed are not accepted into that aggregation. A stream-table join is appropriate when each reading should be enriched from the latest available metadata state. A stream-stream join is intended to correlate two event streams within a time bound. Zero grace does not extend late arrival acceptance, and a global table has replication and scaling trade-offs rather than removing all constraints.

Question 10

New Single answer

Topic: Application Testing

Skill tested: Assesses deterministic Kafka Streams topology testing with controlled input and output records.

A development team needs a fast unit test for a Kafka Streams topology that aggregates values by key. The test should supply records with explicit timestamps, run the topology without a Kafka broker, and inspect the emitted records. Developers also need to test the actual broker protocol and deployment configuration separately in integration tests. Which choice is best for the unit-test layer?

Correct Answer: B. Use Kafka Streams TestInputTopic and TestOutputTopic with a TopologyTestDriver.
Explanation:

TopologyTestDriver executes a Kafka Streams topology in process, allowing tests to pipe records with controlled keys, values, and timestamps and then inspect output topics without starting brokers. This makes it well suited to deterministic unit tests of aggregation logic. Broker-based integration testing remains valuable for validating serialization, security, and actual Kafka interactions, but starting a cluster for every unit test adds unnecessary cost and nondeterminism. Mocking processors or using production topics does not provide an equivalent topology-level test.

Question 11

New Multiple answers

Topic: Application Observability

Skill tested: Evaluates consumer-lag diagnosis using group offsets and broker-side monitoring signals.

A data engineering team receives alerts that a consumer group is falling behind. The service has several partitions, and the team must determine whether the cause is insufficient consumption capacity or a stalled application before scaling resources. They can inspect Kafka consumer-group offsets and application metrics. Select TWO measurements that provide the most direct evidence of backlog and consumer progress.

Correct Answer: B. Track records-consumed rate and processing latency for the consumer group over time.; E. Compare each partition's log-end offset with the group's committed offset to assess lag.
Explanation:

Consumer lag is derived by comparing the log-end offset with the consumer group's committed offset for each partition; this reveals the amount of unread data at the observation point. Consumption rate and processing latency help determine whether the application is making progress and whether processing itself is slow, informing whether capacity or a stall is likely. Replication factor and partition count describe topic configuration, not current backlog. Producer latency may reveal an upstream issue but does not directly identify consumer progress.