How does Kafka store messages within a topic partition on disk?
Using a B-tree index structure
As an append-only log file
In a hash table for quick retrieval
As individual files for each message
Which of the following is a valid KSQL command to create a new stream from an existing Kafka topic named 'sensor_data'?
CREATE STREAM sensor_data_stream (sensorId INT, value DOUBLE) WITH (kafka_topic='sensor_data', value_format='JSON');
DEFINE STREAM sensor_data_stream (sensorId INT, value DOUBLE) WITH (topic='sensor_data', format='JSON');
INSERT INTO sensor_data_stream SELECT * FROM sensor_data;
CREATE TABLE sensor_data_stream AS SELECT * FROM sensor_data;
What is the primary purpose of log compaction in Kafka?
Deleting old messages based on time
Retaining the latest value for each key
Optimizing message routing
Improving message compression
Which of the following is NOT a core concept in stream processing?
Windowing
Aggregation
Joining streams
Batch processing
What is the primary purpose of ZooKeeper in a multi-node Kafka cluster?
Storing and serving message data
Maintaining cluster metadata and ensuring consistency
Compressing messages for efficient storage
Managing consumer group offsets
What type of metrics would you monitor to track the rate at which messages are being produced to a Kafka topic?
Replication lag metrics
Broker disk usage metrics
Producer request rate metrics
Consumer lag metrics
What happens to the data on a broker that is permanently removed from a Kafka cluster without proper decommissioning?
It is migrated to the ZooKeeper ensemble.
It is automatically replicated to other brokers.
It is permanently lost.
It becomes inaccessible until the broker is added back.
Which scenario would benefit from using a synchronous Kafka producer?
Logging system where message loss is acceptable.
Financial transaction processing where guaranteed message delivery is paramount.
Real-time data streaming where latency is critical.
High-volume sensor data ingestion where throughput is a primary concern.
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?
2
1
6
3
In KSQL, what is a 'STREAM' analogous to in traditional database terminology?
A view
A table
A trigger
A stored procedure