Kafka interview questions and answers

Kafka interview questions and answers(MCQ): Test Your Knowledge!

 

What is the purpose of Kafka\\\'s __transaction_state topic?
To manage transactional guarantees
To store actual messages
To handle authentication
To create new topics
How does Kafka handle delivery timeouts?
By using ZooKeeper
By using the delivery.timeout.ms configuration parameter
By compressing messages
By using SSL/TLS
Which of the following is true about the \"enable.auto.commit\" configuration property in Kafka?
When set to true, offsets are committed automatically
It controls the message compression algorithm
It sets the maximum message size
It defines the number of partitions
What is the difference between \\\"at least once\\\" and \\\"exactly once\\\" semantics in Kafka consumers?
At-least-once may deliver duplicates, exactly-once guarantees no duplicates
At-least-once guarantees order, exactly-once doesn\\\'t
At-least-once is faster, exactly-once is slower
At-least-once uses less memory, exactly-once uses more
How does Kafka ensure fault tolerance?
Through data replication
By using a single server
With manual backups
By avoiding partitions
Which Kafka tool is used for monitoring and alerting?
Kafka Manager
Kafka Monitor
Kafka Cruise Control
Confluent Control Center
What is the purpose of the batch.size configuration property in Kafka producer?
Control the number of messages sent in a single request
Set the maximum message size
Define the number of partitions
Set the replication factor
What is the primary function of a Kafka broker?
To produce messages
To consume messages
To store and manage partitions
To coordinate the cluster
What are the key differences between Spring AMQP and Spring Pub-Sub?
Spring AMQP is for point-to-point; Spring Pub-Sub is for publish-subscribe
No differences
Both are for publish-subscribe
Both are for point-to-point
What is the Kafka buffer time typically used for?
To batch messages for efficiency
To delay message delivery
To sort messages
To compress messages
What is the role of a Kafka Streams state store changelog topic compaction?
To reduce the size of state store backups
To encrypt state data
To improve read performance
To handle authentication
How can you implement a graceful shutdown in a Kafka consumer using Java?
Call consumer.wakeup() and handle WakeupException
Use System.exit(0)
Close the consumer without any preparation
Increase the session timeout
How can you monitor the performance of a Kafka cluster?
Using JMX metrics
Only through log files
By manually checking each broker
Performance monitoring is not possible
What is the purpose of Kafka Connect?
To integrate Kafka with other systems
To connect multiple Kafka clusters
To manage network connections
To create new topics
Which Kafka feature allows for processing streams of data with fault-tolerance?
Kafka Streams
Kafka Connect
Kafka REST Proxy
Kafka Mirror Maker
What is the role of the Kafka consumer\\\'s position() method?
To consume messages
To produce messages
To get the current offset for a partition
To manage brokers
What is the purpose of the unclean.leader.election.enable configuration in Kafka?
To allow out-of-sync replicas to become leader
To enable leader election
To allow multiple leaders
To enable automatic leader balancing
Which of the following is NOT a recommended approach for reducing Kafka consumer lag?
Decreasing the number of consumers
Increasing partition count
Optimizing consumer code
Increasing consumer parallelism
How can you encrypt data at rest in Kafka?
Using filesystem-level encryption
Kafka doesn\\\'t support encryption at rest
Only through SSL
By encrypting individual messages
What is the role of the controller in a Kafka cluster?
To manage topics
To manage brokers
To manage partition leadership
To handle message compression
What is the main difference between Kafka and Apache Gearpump?
Kafka is a messaging system, Gearpump is a processing framework
Kafka is newer
Gearpump doesn\\\'t support streaming
Kafka doesn\\\'t support real-time processing
How does Kafka handle message ordering within a partition?
By using ZooKeeper
By using timestamps
By maintaining order naturally within a partition
By compressing messages
What\\\'s an advanced configuration option for Kafka brokers?
log.retention.bytes
topic.name
consumer.group.id
producer.batch.size
What is the purpose of the Kafka schema registry?
To manage data formats
To store messages
To handle authentication
To create topics
What does Kafka\\\'s log.retention.bytes configuration control?
Maximum size of the log before deleting old segments
Maximum size of a single message
Maximum size of the producer batch
Maximum size of the consumer fetch
Score: 0/25