Understanding Apache Kafka: Exactly-Once Semantics
A beginner's quiz on exactly-once semantics in Apache Kafka.
Questions in this quiz
15 questions on Understanding Apache Kafka: Exactly-Once Semantics. Work through them here, then start the quiz to answer them and see your score.
1.What does 'exactly-once semantics' (EOS) in Apache Kafka ensure?
- AMessages are delivered at most once.
- BMessages are delivered at least once.
- CMessages are never lost.
- DMessages are delivered exactly once.
2.Which Kafka feature is crucial for achieving exactly-once semantics?
- AKafka Connect
- BKafka Partitions
- CKafka Streams
- DKafka Transactions
3.In Kafka, what is a 'transactional producer'?
- AA producer that sends messages without acknowledgment.
- BA producer that duplicates messages.
- CA producer that only reads messages.
- DA producer that can send messages as part of a transaction.
4.What role does the 'transactional.id' play in Kafka?
- AIt identifies the broker.
- BIt identifies the producer.
- CIt identifies the transaction.
- DIt identifies the consumer group.
5.How does Kafka handle message duplication with exactly-once semantics?
- ABy deduplicating messages.
- BBy sending duplicates to a different topic.
- CBy ignoring duplicates.
- DBy storing duplicates.
6.Which component in Kafka is responsible for committing offsets in exactly-once semantics?
- ACoordinator
- BProducer
- CConsumer
- DBroker
7.What is the main advantage of using exactly-once semantics in Kafka?
- AData consistency
- BHigher throughput
- CLower latency
- DSimpler configuration
8.Which Kafka client configuration is necessary for enabling exactly-once semantics?
- Alinger.ms
- Bbatch.size
- Cacks=0
- Denable.idempotence
9.What happens if a Kafka transaction fails?
- AMessages are discarded.
- BMessages are sent anyway.
- CMessages are retried indefinitely.
- DMessages are rolled back.
10.In Kafka, what is the purpose of the 'transaction.timeout.ms' setting?
- ATo set the maximum time for a broker to store a message.
- BTo set the maximum time for a consumer to read a message.
- CTo set the maximum time for a transaction to complete.
- DTo set the maximum time for a producer to send a message.
11.Which of the following is a potential drawback of using exactly-once semantics?
- AReduced data integrity
- BDecreased reliability
- CSimplified error handling
- DIncreased latency
12.How does Kafka ensure atomicity in transactions?
- ABy using distributed locks
- BBy using a single broker
- CBy using a two-phase commit protocol
- DBy using transaction logs
13.What is the role of 'idempotent producer' in Kafka?
- ATo produce messages multiple times
- BTo ensure messages are produced exactly once
- CTo store messages indefinitely
- DTo consume messages exactly once
14.Which of the following is NOT required for exactly-once semantics in Kafka?
- ATransactional producer
- BIdempotent producer
- CCoordinator
- DConsumer group
15.What is the primary function of the 'transaction coordinator' in Kafka?
- ATo manage producer retries
- BTo manage broker configurations
- CTo manage transactions
- DTo manage consumer offsets