Confluent Certified Administrator for Apache Kafka Free Sample Questions

Description

Covers Kafka core components, ZooKeeper and KRaft architecture, authentication and authorization, high availability deployment, Kafka Connect, broker and cluster configuration, and monitoring.

20 free sample questions218 in the full practice test

Try simulator

CCAAK Sample Questions

  1. Question 1

    Advanced

    Troubleshooting · Diagnosing and resolving performance issues related to ISR management and broker health.

    An administrator is investigating a Kafka cluster where producers are experiencing high latency and frequent timeouts. The topic in question has a replication factor of 3 and min.insync.replicas is set to 2. Monitoring reveals that one of the three brokers hosting partitions for this topic is consistently exhibiting high disk I/O wait times, causing it to frequently fall out of the In-Sync Replica (ISR) set. What is the most effective initial action to mitigate the producer latency while ensuring data durability is not compromised below the configured minimum?

    Answer and explanation

    Correct answer: C

    This is the most effective initial step. By moving the partition leadership to healthy brokers, producers will no longer be dependent on the slow broker for acknowledging writes. This directly addresses the latency issue without changing durability settings, allowing the administrator to investigate the disk I/O problem on the affected broker without impacting production traffic.

  2. Question 2

    Intermediate

    Apache Kafka Cluster Configuration · Configuring a KRaft controller quorum.

    A financial services company is deploying a new Kafka cluster using KRaft mode. The architecture calls for a dedicated controller quorum of 5 nodes for high availability. What is the correct value for the controller.quorum.voters configuration property on each controller node?

    Answer and explanation

    Correct answer: B

    The correct format for controller.quorum.voters is a comma-separated string where each entry specifies the node.id, the hostname or IP address, and the controller listener port for each node in the quorum. For example: 1@controller1:9093,2@controller2:9093,....

  3. Question 3

    IntermediateMultiple answers

    Apache Kafka Cluster Configuration · Configuring and managing client quotas.

    An administrator needs to enforce client quotas to prevent a single misbehaving application from monopolizing cluster resources. The goal is to limit the network bandwidth consumed by a specific user, 'app-user-1'. Which two properties must be configured to enforce a produce quota for this user? (Select TWO)

    Answer and explanation

    Correct answers: B, C

    This property sets the byte-rate threshold for producers. When combined with the user principal, it defines the specific bandwidth limit for that user's produce requests.

    This property specifies the user principal to which the quota will be applied. To target 'app-user-1', this must be set to that principal name.

  4. Question 4

    Beginner

    Apache Kafka Fundamentals · Understanding data durability trade-offs with unclean leader election.

    True or False: When unclean.leader.election.enable is set to true for a topic, it is possible for messages that were not replicated to all in-sync replicas to be lost during a leader failover.

    Answer and explanation

    Correct answer: A

    This statement is true. The purpose of unclean leader election is to prioritize availability over consistency. If no in-sync replicas are available to become the new leader, this setting allows an out-of-sync replica to be elected. This new leader may not have all the messages the old leader had, leading to data loss.

  5. Question 5

    Intermediate

    Apache Kafka Fundamentals · Troubleshooting log compaction.

    A new administrator is tasked with setting up log compaction on a topic named user-profiles. The goal is to retain only the most recent value for each user ID, which is used as the message key. After enabling compaction, the administrator observes that old records are not being removed, and the topic's log segments are growing indefinitely. Which configuration setting is the most likely cause of this issue?

    Answer and explanation

    Correct answer: A

    Log compaction works by retaining the latest message for each unique key. If messages are produced with null keys, Kafka cannot determine which records to compact. Messages with null keys are not eligible for compaction and will be retained until their segment is deleted by time or size-based retention, if also configured. This is the most common reason for compaction appearing not to work.

  6. Question 6

    Intermediate

    Kafka Connect · Understanding fault tolerance and rebalancing in Kafka Connect.

    An administrator is setting up a Kafka Connect cluster in distributed mode to sink data from a Kafka topic to a database. To ensure high availability and fault tolerance, how does the Connect cluster handle a worker node failure?

    Answer and explanation

    Correct answer: C

    When a worker in a distributed Kafka Connect cluster fails or leaves the group, the group coordinator triggers a rebalance. During this rebalance, all tasks from the failed worker (and potentially other workers) are redistributed among the surviving members of the cluster, ensuring that data processing continues with minimal interruption.

  7. Question 7

    Intermediate

    Apache Kafka Security · Configuring prefixed ACLs for resource access control.

    You are designing a security policy for a multi-tenant Kafka cluster. You need to grant a team, represented by the user principal user:data-science, the ability to consume from any topic prefixed with ds-, but prevent them from consuming from any other topics. Which ACL entry correctly implements this policy?

    Answer and explanation

    Correct answer: C

    This is the correct command. It specifies the operation (Read), the principal (user:data-science), the resource name (ds-), and crucially, sets the --resource-pattern-type to prefixed. This tells the authorizer to match any topic whose name begins with ds-. Don't forget that you also need to grant Read access to the consumer group.

  8. Question 8

    Advanced

    Troubleshooting · Diagnosing consumer performance issues and rebalance problems.

    During a routine check, an administrator notices that the consumer lag for a critical application is steadily increasing. The application runs a single consumer as part of a consumer group subscribed to a topic with 12 partitions. The consumer's max.poll.records is set to 500 (the default), and max.poll.interval.ms is 300000 (5 minutes). Logs show that the consumer is not being removed from the group, but processing a single batch of 500 records takes, on average, 6 minutes. What is the most direct cause of the increasing consumer lag?

    Answer and explanation

    Correct answer: B

    The max.poll.interval.ms setting defines the maximum time allowed between calls to the poll() method. If the consumer takes longer than this to process the records from a single poll (6 minutes > 5 minutes), the broker's group coordinator will assume the consumer has failed and kick it out of the group, triggering a rebalance. The logs might not show it immediately, but this constant rebalancing and reprocessing is the direct cause of the lag.

  9. Question 9

    Beginner

    Observability · Using command-line tools for cluster health checks.

    Which of the following Kafka command-line tools would an administrator use to check for under-replicated partitions in a cluster?

    Answer and explanation

    Correct answer: B

    The kafka-topics.sh --describe command provides detailed information about topics, including the leader, replicas, and the In-Sync Replica (ISR) set for each partition. By comparing the list of replicas with the ISR list, an administrator can identify any partitions that are under-replicated.

  10. Question 10

    Intermediate

    Deployment Architecture · Configuring rack awareness for high availability.

    A media company uses Kafka to process video streams. They want to deploy a cluster across three availability zones (AZs) for high availability. To ensure that replicas for any given partition are spread across these AZs, which broker configuration property must be set?

    Answer and explanation

    Correct answer: C

    The broker.rack property is used to enable Kafka's rack awareness feature. By setting this property on each broker to the name of the availability zone it resides in (e.g., us-east-1a), Kafka will make a best effort to spread replicas of a partition across different racks (AZs), preventing a single AZ failure from causing data loss or unavailability.

Register free for 10 more questions

Or unlock all 218 CCAAK questions with explanations, timed mode and flashcards.