Free CCDAK Exam Dumps

Question 31

What exceptions may be caught by the following producer? (select two) ProducerRecord record =
new ProducerRecord<>("topic1", "key1", "value1"); try {
producer.send(record);
} catch (Exception e) { e.printStackTrace();
}

Correct Answer:BD
These are the client side exceptions that may be encountered before message is sent to the broker, and before a future is returned by the .send() method.

Question 32

Producing with a key allows to...

Correct Answer:B
Keys are necessary if you require strong ordering or grouping for messages that share the same key. If you require that messages with the same key are always seen in the correct order, attaching a key to messages will ensure messages with the same key always go to the same partition in a topic. Kafka guarantees order within a partition, but not across partitions in a topic, so alternatively not providing a key - which will result in round-robin distribution across partitions - will not maintain such order.

Question 33

How do you create a topic named test with 3 partitions and 3 replicas using the Kafka CLI?

Correct Answer:C
As of Kafka 2.3, the kafka-topics.sh command can take --bootstrap-server localhost:9092 as an argument. You could also use the (now deprecated) option of --zookeeper localhost:2181.

Question 34

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

Correct 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 35

Where are KSQL-related data and metadata stored?

Correct Answer:A
metadata is stored in and built from the KSQL command topic. Each KSQL server has its own in-memory version of the metastore.