How will you read all the messages from a topic in your KSQL query?
Correct Answer:
C
Consumers can set auto.offset.reset property to earliest to start consuming from beginning. For KSQL, SET 'auto.offset.reset'='earliest';
How will you set the retention for the topic named ‚Ä??my-topic‚Ä?? to 1 hour?
Correct Answer:
C
retention.ms can be configured at topic level while creating topic or by altering topic. It shouldn't be set at the broker level (log.retention.ms) as this would impact all the topics in the cluster, not just the one we are interested in
A customer has many consumer applications that process messages from a Kafka topic. Each consumer application can only process 50 MB/s. Your customer wants to achieve a target throughput of 1 GB/s. What is the minimum number of partitions will you suggest to the customer for that particular topic?
Correct Answer:
B
each consumer can process only 50 MB/s, so we need at least 20 consumers consuming one partition so that 50 * 20 = 1000 MB target is achieved.
What is true about replicas ?
Correct Answer:
C
Replicas are passive - they don't handle produce or consume request. Produce and consume requests get sent to the node hosting partition leader.
You are using JDBC source connector to copy data from 2 tables to two Kafka topics. There is one connector created with max.tasks equal to 2 deployed on a cluster of 3 workers. How many tasks are launched?
Correct Answer:
C
we have two tables, so the max number of tasks is 2