Stream Processing Topology — Concept Check
Questions on Stream Processing Topology. A topology is a DAG of source, processor, and sink nodes; it is compiled from the high-level DSL (map, filter, join, aggregate) or the low-level Processor API.
Questions in this quiz
8 questions on Stream Processing Topology — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A developer is building a Kafka Streams topology using the Streams DSL. They need to filter, transform, and branch the records based on order value. Which component should they use to split the stream into high-value and standard orders?
- AUtilizing the join() operation
- BBranching using the split() method
- CApplying a flatMap() transformation
- DUsing groupBy() to separate streams
2.You have a KStream of order events and a KTable of customer data. You want to enrich order events with customer names. What operation should you use?
- AFilter the KStream for customer data
- BMap the KStream to customer names
- CAggregate the KStream into a KTable
- DJoin the KStream with the KTable
3.A developer is using the Processor API for fine-grained control. What is a scenario where this is necessary?
- AFor simple filtering and mapping operations
- BTo join a KStream with a KTable
- CWhen needing custom state stores and side effects
- DTo count events in a stream
4.A topology built with Streams DSL has a KStream and a KTable. The developer notices that the KTable is not updating as expected. What might be the issue?
- AThe KTable is not materialized correctly
- BThe KStream is not being filtered
- CThe KTable is missing a join operation
- DThe KStream is not split properly
5.In a Kafka Streams application, what is the role of a sink node?
- ATo join KStreams and KTables
- BTo read data from Kafka topics
- CTo write results to Kafka topics or state stores
- DTo transform and filter records
6.A developer uses the StreamsBuilder to create a topology. They use the mapValues() method to enrich data. What is the purpose of this method?
- ATo filter records based on a condition
- BTo join the stream with another table
- CTo transform the values of each record
- DTo split the stream into branches
7.A developer uses groupBy() on a KStream to prepare for aggregation. What is the result of this operation?
- AA split stream for branching
- BA KGroupedStream for aggregation
- CA filtered stream with specific keys
- DA joined stream with a KTable
8.A developer wants to visualize the topology DAG during development. Which method should they use?
- ATopology.describe()
- BKTable.toStream()
- CKStream.to()
- DStreamsBuilder.build()