0
0
Kafkadevops~20 mins

Exactly-once stream processing in Kafka - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Exactly-Once Kafka Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding Exactly-Once Semantics in Kafka

Which Kafka feature ensures that messages are processed exactly once in a stream processing application?

AKafka Transactions
BKafka Consumer Groups
CKafka Partitions
DKafka Replication
Attempts:
2 left
💡 Hint

Think about what mechanism allows atomic writes and commits in Kafka.

💻 Command Output
intermediate
1:30remaining
Kafka Producer Transaction Initialization Output

What is the expected output when a Kafka producer successfully initializes transactions?

Kafka
producer.initTransactions();
System.out.println("Transactions initialized");
ATransactions initialized
BException: Transactions not supported
CNo output
DError: Producer not configured
Attempts:
2 left
💡 Hint

Consider what happens when the initTransactions method completes without error.

🔀 Workflow
advanced
2:00remaining
Correct Order of Steps for Exactly-Once Processing in Kafka Streams

Arrange the following steps in the correct order to achieve exactly-once processing in a Kafka Streams application.

A1,3,2,4
B2,1,3,4
C1,2,3,4
D2,3,1,4
Attempts:
2 left
💡 Hint

Think about starting the transaction before processing and committing after sending output.

Troubleshoot
advanced
2:00remaining
Identifying the Cause of Duplicate Messages in Exactly-Once Kafka Streams

A Kafka Streams application configured for exactly-once processing is producing duplicate output messages. What is the most likely cause?

AThe producer is not using transactions
BThe application is using at-least-once processing mode
CThe input topic has multiple partitions
DThe consumer group ID is not set
Attempts:
2 left
💡 Hint

Consider the processing guarantee mode configured in the application.

Best Practice
expert
2:30remaining
Best Practice for Configuring Kafka Producer for Exactly-Once Semantics

Which configuration is essential to enable exactly-once semantics in a Kafka producer?

Alinger.ms=1000 and max.in.flight.requests.per.connection=5
Backs=0 and retries=0
Ccompression.type=none and batch.size=0
Denable.idempotence=true and transaction.id set
Attempts:
2 left
💡 Hint

Think about settings that prevent duplicate sends and enable transactions.