Spring Sale Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

Confluent CCDAK Confluent Certified Developer for Apache Kafka Certification Examination Exam Practice Test

Page: 1 / 9
Total 90 questions

Confluent Certified Developer for Apache Kafka Certification Examination Questions and Answers

Question 1

You are writing a producer application and need to ensure proper delivery. You configure the producer with acks=all.

Which two actions should you take to ensure proper error handling?

(Select two.)

Options:

A.

Use a callback argument in producer.send() where you check delivery status.

B.

Check that producer.send() returned a RecordMetadata object and is not null.

C.

Surround the call of producer.send() with a try/catch block to catch KafkaException.

D.

Check the value of ProducerRecord.status().

Question 2

Which two statements about Kafka Connect Single Message Transforms (SMTs) are correct?

(Select two.)

Options:

A.

Multiple SMTs can be chained together and act on source or sink messages.

B.

SMTs are often used to join multiple records from a source data system into a single Kafka record.

C.

Masking data is a good example of an SMT.

D.

SMT functionality is included within Kafka Connect converters.

Question 3

You are working on a Kafka cluster with three nodes. You create a topic named orders with:

replication.factor = 3

min.insync.replicas = 2

acks = allWhat exception will be generated if two brokers are down due to network delay?

Options:

A.

NotEnoughReplicasException

B.

NetworkException

C.

NotCoordinatorException

D.

NotLeaderForPartitionException

Question 4

Match the testing tool with the type of test it is typically used to perform.

Options:

Question 5

Match each configuration parameter with the correct option.

To answer choose a match for each option from the drop-down. Partial

credit is given for each correct answer.

Question # 5

Options:

Question 6

(You need to send a JSON message on the wire. The message key is a string.

How would you do this?)

Options:

A.

Specify a key serializer class for the JSON contents of the message’s value. Set the value serializer class to null.

B.

Specify a value serializer class for the JSON contents of the message’s value. Set a key serializer for the string value.

C.

Specify a value serializer class for the JSON contents of the message’s value. Set the key serializer class to null.

D.

Specify a value serializer class for the JSON contents of the message’s value. Set the key serializer class to JSON.

Question 7

You need to explain the best reason to implement the consumer callback interface ConsumerRebalanceListener prior to a Consumer Group Rebalance.

Which statement is correct?

Options:

A.

Partitions assigned to a consumer may change.

B.

Previous log files are deleted.

C.

Offsets are compacted.

D.

Partition leaders may change.

Question 8

(You are implementing a Kafka Streams application to process financial transactions.

Each transaction must be processed exactly once to ensure accuracy.

The application reads from an input topic, performs computations, and writes results to an output topic.

During testing, you notice duplicate entries in the output topic, which violates the exactly-once processing requirement.

You need to ensure exactly-once semantics (EOS) for this Kafka Streams application.

Which step should you take?)

Options:

A.

Enable compaction on the output topic to handle duplicates.

B.

Set enable.idempotence=true in the internal producer configuration of the Kafka Streams application.

C.

Set enable.exactly_once=true in the Kafka Streams configuration.

D.

Set processing.guarantee=exactly_once_v2 in the Kafka Streams configuration.

Question 9

(You create an Orders topic with 10 partitions.

The topic receives data at high velocity.

Your Kafka Streams application initially runs on a server with four CPU threads.

You move the application to another server with 10 CPU threads to improve performance.

What does this example describe?)

Options:

A.

Horizontal Scaling

B.

Vertical Scaling

C.

Plain Scaling

D.

Scaling Out

Question 10

(You started a new Kafka Connect worker.

Which configuration identifies the Kafka Connect cluster that your worker will join?)

Options:

A.

cluster.id

B.

worker.id

C.

group.id

D.

connector.id

Question 11

You have a topic t1 with six partitions. You use Kafka Connect to send data from topic t1 in your Kafka cluster to Amazon S3. Kafka Connect is configured for two tasks.

How many partitions will each task process?

Options:

A.

2

B.

3

C.

6

D.

12

Question 12

(You deploy a Kafka Streams application with five application instances.

Kafka Streams stores application metadata using internal topics.

Auto-topic creation is disabled in the Kafka cluster.

Which statement about this scenario is true?)

Options:

A.

The application will continue to work and internal topics will be created, even if auto-topic creation is disabled.

B.

The application will terminate with a non-retriable exception.

C.

The application will work, but application metadata will not be stored.

D.

The application will be on hold until internal topics are created manually.

Question 13

(What are two stateless operations in the Kafka Streams API?

Select two.)

Options:

A.

Reduce

B.

Join

C.

Filter

D.

GroupBy

Question 14

Which partition assignment minimizes partition movements between two assignments?

Options:

A.

RoundRobinAssignor

B.

StickyAssignor

C.

RangeAssignor

D.

PartitionAssignor

Question 15

Which two producer exceptions are examples of the class RetriableException? (Select two.)

Options:

A.

LeaderNotAvailableException

B.

RecordTooLargeException

C.

AuthorizationException

D.

NotEnoughReplicasException

Question 16

Which two statements are correct about transactions in Kafka?

(Select two.)

Options:

A.

All messages from a failed transaction will be deleted from a Kafka topic.

B.

Transactions are only possible when writing messages to a topic with single partition.

C.

Consumers can consume both committed and uncommitted transactions.

D.

Information about producers and their transactions is stored in the _transaction_state topic.

E.

Transactions guarantee at least once delivery of messages.

Question 17

You are composing a REST request to create a new connector in a running Connect cluster. You invoke POST /connectors with a configuration and receive a 409 (Conflict) response.

What are two reasons for this response? (Select two.)

Options:

A.

The connector configuration was invalid, and the response body will expand on the configuration error.

B.

The connect cluster has reached capacity, and new connectors cannot be created without expanding the cluster.

C.

The Connector already exists in the cluster.

D.

The Connect cluster is in process of rebalancing.

Question 18

Match each configuration parameter with the correct deployment step in installing a Kafka connector.

Question # 18

Options:

Question 19

Which is true about topic compaction?

Options:

A.

When a client produces a new event with an existing key, the old value is overwritten with the new value in the compacted log segment.

B.

When a client produces a new event with an existing key, the broker immediately deletes the offset of the existing event.

C.

Topic compaction does not remove old events; instead, when clients consume events from a compacted topic, they store events in a hashmap that maintains the latest value.

D.

Compaction will keep exactly one message per key after compaction of inactive log segments.

Question 20

Which two statements are correct when assigning partitions to the consumers in a consumer group using the assign() API?

(Select two.)

Options:

A.

It is mandatory to subscribe to a topic before calling assign() to assign partitions.

B.

The consumer chooses which partition to read without any assignment from brokers.

C.

The consumer group will not be rebalanced if a consumer leaves the group.

D.

All topics must have the same number of partitions to use assign() API.

Question 21

Where are source connector offsets stored?

Options:

A.

offset.storage.topic

B.

storage.offset.topic

C.

topic.offset.config

D.

offset, storage, partitions

Question 22

What are two examples of performance metrics?

(Select two.)

Options:

A.

fetch-rate

B.

Number of active users

C.

total-login-attempts

D.

incoming-byte-rate

E.

Number of active user sessions

F.

Time of last failed login

Question 23

(You are developing a Kafka Streams application with a complex topology that has multiple sources, processors, sinks, and sub-topologies.

You are working in a development environment and do not have access to a real Kafka cluster or topics.

You need to perform unit testing on your Kafka Streams application.

Which should you use?)

Options:

A.

TestProducer, TestConsumer

B.

KafkaUnitTestDriver

C.

TopologyTestDriver

D.

MockProducer, MockConsumer

Question 24

Your application is consuming from a topic with one consumer group.

The number of running consumers is equal to the number of partitions.

Application logs show that some consumers are leaving the consumer group during peak time, triggering a rebalance. You also notice that your application is processing many duplicates.

You need to stop consumers from leaving the consumer group.

What should you do?

Options:

A.

Reduce max.poll.records property.

B.

Increase session.timeout.ms property.

C.

Add more consumer instances.

D.

Split consumers in different consumer groups.

Question 25

(You have a topic with four partitions. The application reading this topic is using a consumer group with two consumers.

Throughput is smoothly distributed among partitions, but application lag is increasing.

Application monitoring shows that message processing is consuming all available CPU resources.

Which action should you take to resolve this issue?)

Options:

A.

Add more partitions to the topic to increase the level of parallelism of the processing.

B.

Increase the max.poll.records property of consumers.

C.

Add more consumers to increase the level of parallelism of the processing.

D.

Decrease the max.poll.records property of consumers.

Question 26

(You need to set alerts on key broker metrics to trigger notifications when a Kafka cluster is unhealthy.

What are three minimum broker metrics to monitor for cluster health?

Select three.)

Options:

A.

kafka.controller:type=KafkaController,name=LastCommittedRecordOffset

B.

kafka.controller:type=ControllerStats,name=UncleanLeaderElectionsPerSec

C.

kafka.controller:type=KafkaController,name=ActiveControllerCount

D.

kafka.controller:type=KafkaController,name=OfflinePartitionsCount

E.

kafka.controller:type=KafkaController,name=TopicsToDeleteCount

Question 27

(A consumer application needs to use an at-most-once delivery semantic.

What is the best consumer configuration and code skeleton to avoid duplicate messages being read?)

Options:

A.

auto.offset.reset=latest and enable.auto.commit=truewhile (true) {final var records = consumer.poll(POLL_TIMEOUT);for (var record : records) {// Any processing}consumer.commitAsync();}

B.

auto.offset.reset=earliest and enable.auto.commit=falsewhile (true) {final var records = consumer.poll(POLL_TIMEOUT);consumer.commitAsync();for (var record : records) {// Any processing}}

C.

auto.offset.reset=earliest and enable.auto.commit=falsewhile (true) {final var records = consumer.poll(POLL_TIMEOUT);for (var record : records) {// Any processing}consumer.commitAsync();}

D.

auto.offset.reset=earliest and enable.auto.commit=truewhile (true) {final var records = consumer.poll(POLL_TIMEOUT);consumer.commitAsync();for (var record : records) {// Any processing}}

Page: 1 / 9
Total 90 questions