What happens to a consumer's offset when it encounters an error while processing a message?
The message is discarded and the offset is advanced.
The offset is not updated until the message is successfully processed.
The offset is automatically reset to the beginning of the partition.
The consumer is removed from the consumer group.
What is the primary benefit of using Kafka's idempotent producer feature?
Elimination of duplicate messages on the broker due to producer retries.
Automatic data balancing across multiple Kafka brokers.
Increased throughput by reducing the need for message acknowledgments.
Improved message ordering guarantees within a partition.
Which of the following is a valid KSQL command to create a new stream from an existing Kafka topic named 'sensor_data'?
DEFINE STREAM sensor_data_stream (sensorId INT, value DOUBLE) WITH (topic='sensor_data', format='JSON');
CREATE TABLE sensor_data_stream AS SELECT * FROM sensor_data;
CREATE STREAM sensor_data_stream (sensorId INT, value DOUBLE) WITH (kafka_topic='sensor_data', value_format='JSON');
INSERT INTO sensor_data_stream SELECT * FROM sensor_data;
What is the significance of 'Exactly Once Semantics' in Kafka Streams?
It prevents duplicate processing of records even in the event of failures.
It prioritizes speed over accuracy in data processing.
It guarantees that each record is processed at least once.
It ensures that records are processed in the exact order they were produced.
What is the significance of the 'unclean.leader.election.enable' configuration parameter during broker failures?
It defines the time a broker is considered dead before triggering a leader election.
It ensures no data loss during leader election but might increase unavailability.
It allows for faster leader election but might lead to data loss.
It controls the replication factor for partitions.
Which tool is used to perform controlled shutdown and removal of a broker from a Kafka cluster?
kafka-preferred-replica-election.sh
kafka-reassign-partitions.sh
kafka-config.sh
kafka-topics.sh
What happens to the data on a broker that is permanently removed from a Kafka cluster without proper decommissioning?
It is automatically replicated to other brokers.
It becomes inaccessible until the broker is added back.
It is migrated to the ZooKeeper ensemble.
It is permanently lost.
In a Kafka topic with multiple partitions and a replication factor of 3, what is the minimum number of brokers required for fault tolerance if one broker can fail?
3
1
2
6
How does Kafka store messages within a topic partition on disk?
Using a B-tree index structure
In a hash table for quick retrieval
As individual files for each message
As an append-only log file
In Kafka Streams, what is the primary difference between stateful and stateless processing?
Stateful processing is used for filtering data, while stateless processing is used for transformations.
Stateful processing is more scalable than stateless processing.
Stateless processing is faster than stateful processing because it does not require data storage.
Stateful processing allows access to historical data, while stateless processing only considers the current record.