What happen when broker.rack configuration is provided in broker configuration in Kafka cluster?
A. You can use the same broker.id as long as they have different broker.rack configuration
B. Replicas for a partition are placed in the same rack
C. Replicas for a partition are spread across different racks
D. Each rack contains all the topics and partitions, effectively making Kafka highly available
How can you gracefully make a Kafka consumer to stop immediately polling data from Kafka and gracefully shut down a consumer application?
A. Call consumer.wakeUp() and catch a WakeUpException
B. Call consumer.poll() in another thread
C. Kill the consumer thread
You are doing complex calculations using a machine learning framework on records fetched from a Kafka topic. It takes more about 6 minutes to process a record batch, and the consumer enters rebalances even though it's still running. How can you improve this scenario?
A. Increase max.poll.interval.ms to 600000
B. Increase heartbeat.interval.ms to 600000
C. Increase session.timeout.ms to 600000
D. Add consumers to the consumer group and kill them right away
A client connects to a broker in the cluster and sends a fetch request for a partition in a topic. It gets an exception Not Leader For Partition Exception in the response. How does client handle this situation?
A. Get the Broker id from Zookeeper that is hosting the leader replica and send request to it
B. Send metadata request to the same broker for the topic and select the broker hosting the leader replica
C. Send metadata request to Zookeeper for the topic and select the broker hosting the leader replica
D. Send fetch request to each Broker in the cluster
A consumer application is using KafkaAvroDeserializer to deserialize Avro messages. What happens if message schema is not present in AvroDeserializer local cache?
A. Throws SerializationException
B. Fails silently
C. Throws DeserializationException
D. Fetches schema from Schema Registry
A consumer starts and has auto.offset.reset=latest, and the topic partition currently has data for offsets going from 45 to 2311. The consumer group has committed the offset 643 for the topic before. Where will the consumer read from?
A. it will crash
B. offset 2311
C. offset 643
D. offset 45
Which of the following is not an Avro primitive type?
A. string
B. long
C. int
D. date
E. null
A Zookeeper configuration has tickTime of 2000, initLimit of 20 and syncLimit of 5. What's the timeout value for followers to connect to Zookeeper?
A. 20 sec
B. 10 sec
C. 2000 ms
D. 40 sec
We want the average of all events in every five-minute window updated every minute. What kind of Kafka Streams window will be required on the stream?
A. Session window
B. Tumbling window
C. Sliding window
D. Hopping window
Select all the way for one consumer to subscribe simultaneously to the following topics - topic.history, topic.sports, topic.politics? (select two)
A. consumer.subscribe(Pattern.compile("topic\..*"));
B. consumer.subscribe("topic.history"); consumer.subscribe("topic.sports"); consumer.subscribe("topic.politics");
C. consumer.subscribePrefix("topic.");
D. consumer.subscribe(Arrays.asList("topic.history", "topic.sports", "topic.politics"));