What is the purpose of stateful operations in Kafka Streams?
To ensure exactly-once message delivery semantics.
To store processed data permanently in a relational database.
To filter and route messages based on content.
To maintain and update information across multiple messages in a stream.
What is a key difference between synchronous and asynchronous producers in Kafka?
Synchronous producers block until the broker acknowledges message receipt, while asynchronous producers send messages without waiting for confirmation.
Synchronous producers are only used for high-throughput scenarios, while asynchronous producers are suitable for low-throughput cases.
Synchronous producers send messages to multiple topics, while asynchronous producers send to a single topic.
Synchronous producers use a push-based model, while asynchronous producers use a pull-based model.
Which scenario would benefit from using a synchronous Kafka producer?
Real-time data streaming where latency is critical.
Financial transaction processing where guaranteed message delivery is paramount.
High-volume sensor data ingestion where throughput is a primary concern.
Logging system where message loss is acceptable.
In KSQL, what is a 'STREAM' analogous to in traditional database terminology?
A trigger
A view
A stored procedure
A table
Which of the following is a valid KSQL command to create a new stream from an existing Kafka topic named 'sensor_data'?
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;
DEFINE STREAM sensor_data_stream (sensorId INT, value DOUBLE) WITH (topic='sensor_data', format='JSON');
What is the purpose of consumer groups in Kafka?
To guarantee message ordering for all consumers.
To replicate messages across multiple data centers.
To allow multiple consumers to subscribe to the same topic and each process a subset of messages.
To store messages persistently on disk.
Which of the following is NOT a core concept in stream processing?
Windowing
Batch processing
Joining streams
Aggregation
Which method in the Kafka Consumer API is used to retrieve a batch of records from a topic?
consume()
fetch()
receive()
poll()
What does the term 'offset' represent in Kafka?
The timestamp associated with a message.
The unique identifier assigned to each message.
The physical location of a message on disk.
The position of a message within a partition.
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 is permanently lost.
It becomes inaccessible until the broker is added back.
It is migrated to the ZooKeeper ensemble.