Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
What is the main purpose of replication in a Kafka cluster?
Not quite. Try another option.
Answer: To improve fault tolerance
Replication keeps copies of partition data on multiple brokers, helping Kafka continue operating after failures.
Question 7 of 60 · Apache Kafka installation · Easy
Which software platform is commonly required to run Apache Kafka?
Not quite. Try another option.
Answer: Java
Apache Kafka runs on the Java Virtual Machine, so a compatible Java installation is commonly required.
Question 8 of 60 · Apache Kafka installation · Easy
What should usually be configured before starting a Kafka broker?
Not quite. Try another option.
Answer: Broker properties
Broker properties define settings such as listeners, storage directories, and broker identity.
Question 9 of 60 · Integration of Apache Kafka with Spark · Easy
Which Spark feature is commonly used to process streaming data from Kafka?
Not quite. Try another option.
Answer: Structured Streaming
Spark Structured Streaming can read Kafka topics as streaming data sources.
Question 10 of 60 · Integration of Apache Kafka with Spark · Easy
In a Spark and Kafka integration, what role does Kafka usually play?
Not quite. Try another option.
Answer: Streaming data source
Kafka commonly supplies streams of messages that Spark reads and processes.
Question 11 of 60 · Integration of Apache Kafka with Spark · Easy
Which information does Spark need to connect to a Kafka cluster?
Not quite. Try another option.
Answer: Bootstrap server addresses
Bootstrap server addresses identify the Kafka brokers that Spark can initially contact.
Question 12 of 60 · Producer and consumer messaging model · Easy
What does a Kafka producer do?
Not quite. Try another option.
Answer: Sends messages to topics
A producer publishes messages to one or more Kafka topics.
Question 13 of 60 · Producer and consumer messaging model · Easy
What does a Kafka consumer do?
Not quite. Try another option.
Answer: Reads messages from topics
A consumer subscribes to Kafka topics and reads their messages.
Question 14 of 60 · Producer and consumer messaging model · Easy
What is the purpose of a Kafka consumer group?
Not quite. Try another option.
Answer: To share message processing among consumers
Consumers in a group divide topic partitions among themselves to process data in parallel.
Question 15 of 60 · Kafka pipeline · Easy
Which sequence represents a basic Kafka data pipeline?
Not quite. Try another option.
Answer: Producer to Kafka to consumer
A basic pipeline sends data from a producer into Kafka, where a consumer can read it.
Question 16 of 60 · Kafka pipeline · Easy
What is the role of Kafka in a data pipeline?
Not quite. Try another option.
Answer: Transporting and buffering event data
Kafka transports event data between systems and buffers it until consumers process it.
Question 17 of 60 · Kafka pipeline · Easy
What does an offset identify in a Kafka partition?
Not quite. Try another option.
Answer: A message position
An offset is a numeric position that identifies a message within a partition.
Question 18 of 60 · Ingestion patterns · Easy
Which ingestion pattern processes events soon after they are generated?
Not quite. Try another option.
Answer: Real-time ingestion
Real-time ingestion processes incoming events with very low delay.
Question 19 of 60 · Ingestion patterns · Easy
Which ingestion pattern collects data over a period before processing it together?
Not quite. Try another option.
Answer: Batch ingestion
Batch ingestion gathers data into groups and processes each group at scheduled intervals.
Question 20 of 60 · Ingestion patterns · Easy
Which ingestion pattern is suitable for continuously arriving sensor readings?
Not quite. Try another option.
Answer: Streaming ingestion
Streaming ingestion is suitable for continuous data sources such as sensors, logs, and user activity events.
Question 21 of 60 · Fundamentals of Apache Kafka · Medium
An application requires all events for the same customer to be processed in the order in which they were produced. Which Kafka design best supports this requirement?
Not quite. Try another option.
Answer: Use the customer ID as the message key
Kafka hashes the message key to select a partition. Events with the same customer ID therefore reach the same partition, where ordering is preserved.
Question 22 of 60 · Fundamentals of Apache Kafka · Medium
A Kafka topic has a retention period of seven days. A consumer remains offline for nine days and then resumes from its last committed offset. What is the most likely outcome?
Not quite. Try another option.
Answer: The consumer may find its required offsets unavailable
Kafka retention is independent of whether a consumer has read the records. Offsets referring to deleted log segments may no longer be available.
Question 23 of 60 · Fundamentals of Apache Kafka · Medium
A topic contains six partitions, and each partition receives approximately 500 messages per second. Assuming an even distribution, what is the approximate total ingestion rate?
Not quite. Try another option.
Answer: 3,000 messages per second
The approximate total rate is messages per second.
Question 24 of 60 · Apache Kafka cluster architecture · Medium
A partition has replication factor 3. Its leader broker fails, but two replicas remain in the in-sync replica set. What should the cluster normally do?
Not quite. Try another option.
Answer: Promote an in-sync replica as leader
Kafka can elect an available in-sync replica as the new leader, allowing reads and writes to continue while preserving replicated data.
Question 25 of 60 · Apache Kafka cluster architecture · Medium
A Kafka topic has 12 partitions and is consumed by one consumer group containing 15 active consumers. How many consumers can process records simultaneously at most?
Not quite. Try another option.
Answer: 12 consumers
Within a consumer group, each partition is assigned to at most one consumer. Therefore, only 12 consumers can be active for 12 partitions.
Question 26 of 60 · Apache Kafka cluster architecture · Medium
Why are partition replicas usually distributed across different Kafka brokers?
Not quite. Try another option.
Answer: To preserve data after a broker failure
Distributing replicas across brokers prevents one broker failure from removing every copy of a partition.
Question 27 of 60 · Apache Kafka installation · Medium
When configuring a multi-broker Kafka cluster, which combination is required for the brokers to operate as members of the same cluster?
Not quite. Try another option.
Answer: Unique node IDs and the same cluster identity
Each broker must have a unique node or broker identifier, while all brokers must be initialized and configured as members of the same Kafka cluster.
Question 28 of 60 · Apache Kafka installation · Medium
Kafka starts successfully, but remote clients receive broker addresses such as localhost:9092 and cannot connect. Which configuration should be checked first?
Not quite. Try another option.
Answer: The advertised listener address
Kafka returns its advertised listener address to clients. That address must be reachable from the client network rather than resolving only inside the broker host.
Question 29 of 60 · Apache Kafka installation · Medium
After installing Kafka, an administrator wants to verify end-to-end messaging before connecting Spark. Which test is most appropriate?
Not quite. Try another option.
Answer: Create a topic, produce records, and consume them
Creating a topic and successfully sending and receiving records verifies basic broker availability, topic operation, and client connectivity.
Question 30 of 60 · Integration of Apache Kafka with Spark · Medium
A Spark Structured Streaming application must resume from the correct Kafka offsets after a driver restart. Which feature should be configured?
Not quite. Try another option.
Answer: A checkpoint location on durable storage
Spark stores streaming progress and source offsets in its checkpoint location, allowing the query to recover after a restart.
Question 31 of 60 · Integration of Apache Kafka with Spark · Medium
A Kafka topic has eight partitions, but a Spark streaming job is configured with 20 executor cores. What primarily limits the initial parallelism of Kafka reads?
Not quite. Try another option.
Answer: The number of Kafka partitions
Kafka source work is divided by topic partitions. With eight partitions, extra cores may not increase source-read parallelism unless data is repartitioned later.
Question 32 of 60 · Integration of Apache Kafka with Spark · Medium
In Spark Structured Streaming, Kafka records expose key and value as binary columns. What should the application normally do before applying string or JSON operations?
Not quite. Try another option.
Answer: Cast the required binary columns to strings
Kafka keys and values are read as binary data. They must normally be cast or decoded before string parsing or JSON schema extraction.
Question 33 of 60 · Integration of Apache Kafka with Spark · Medium
A Spark streaming query reads Kafka events containing event timestamps and performs a windowed aggregation. Which feature helps limit state for events arriving late?
Not quite. Try another option.
Answer: Watermarking on the event-time column
A watermark defines how late event-time data may arrive and allows Spark to remove old aggregation state after the lateness threshold.
Question 34 of 60 · Producer and consumer messaging model · Medium
A producer sets acks=all for a replicated Kafka topic. What is the main effect?
Not quite. Try another option.
Answer: The leader waits for acknowledgments from in-sync replicas
With acks=all, the leader waits for the required in-sync replicas to acknowledge the write, improving durability compared with weaker acknowledgment settings.
Question 35 of 60 · Producer and consumer messaging model · Medium
A consumer processes a record and commits its offset before writing the result to a database. The database write then fails. What delivery problem can occur?
Not quite. Try another option.
Answer: The record may be skipped after restart
Because the offset was committed first, the consumer may restart after that record and never retry the failed database write, causing message loss at the application level.
Question 36 of 60 · Producer and consumer messaging model · Medium
Two independent applications must each receive every event from the same Kafka topic. How should their consumers be configured?
Not quite. Try another option.
Answer: Use two different consumer group IDs
Each consumer group receives its own logical copy of the topic stream. Consumers sharing one group divide partitions instead of independently receiving all events.
Question 37 of 60 · Kafka pipeline · Medium
In a pipeline producers → Kafka → Spark → database, the database becomes temporarily slow. What Kafka capability most directly helps absorb the slowdown?
Not quite. Try another option.
Answer: Persistent buffering of records in topic partitions
Kafka retains records independently of downstream processing speed, allowing Spark to fall behind temporarily and catch up later.
Question 38 of 60 · Kafka pipeline · Medium
Several producers send JSON events to a shared Kafka topic, but they use incompatible field types for the same attribute. Which pipeline practice best prevents processing failures?
Not quite. Try another option.
Answer: Apply a governed schema with compatibility checks
Schema governance and compatibility validation help producers evolve event formats without unexpectedly breaking Spark or other downstream consumers.
Question 39 of 60 · Ingestion patterns · Medium
A company must ingest continuous sensor readings with low latency while also importing one large historical file each night. Which design is most appropriate?
Not quite. Try another option.
Answer: Use streaming ingestion for sensors and batch ingestion for files
Continuous sensor events fit streaming ingestion, while a scheduled historical file is naturally handled as a batch workload.
Question 40 of 60 · Ingestion patterns · Medium
A corrected Spark transformation must be applied to the last three days of Kafka events without asking producers to resend them. Which ingestion pattern enables this?
Not quite. Try another option.
Answer: Replay retained events from earlier offsets
Kafka retention allows a consumer or Spark job to restart from earlier offsets and reprocess historical events, provided those records have not expired.
Question 41 of 60 · Fundamentals of Apache Kafka · Hard
A producer publishes records with keys A, B, and C to a topic with six partitions using Kafka's default key-based partitioning. What property is guaranteed if the number of partitions remains unchanged?
Not quite. Try another option.
Answer: Records with the same key are assigned to the same partition
Kafka hashes a non-null key to select a partition. Therefore, the same key consistently maps to the same partition while the partition count remains unchanged; ordering is guaranteed only within that partition.
Question 42 of 60 · Fundamentals of Apache Kafka · Hard
A Kafka topic has retention.ms=86400000 and retention.bytes=10737418240. The topic contains 20 GB of log data, and all segments are older than the retention time. Which statement best describes retention behavior?
Not quite. Try another option.
Answer: Kafka deletes eligible segments when either limit requires deletion
Time-based and size-based retention are independent deletion conditions. Eligible log segments may be removed when the time limit or the size limit is exceeded, subject to segment granularity.
Question 43 of 60 · Fundamentals of Apache Kafka · Hard
A producer uses acks=all and enables idempotence. A record is acknowledged after being written to all in-sync replicas, but the leader fails before the producer receives the response. What is the safest producer behavior?
Not quite. Try another option.
Answer: Retry the record because idempotence suppresses duplicate appends
The missing response creates uncertainty about the result. Retrying is appropriate, and the producer ID plus sequence number allows the broker to detect and suppress a duplicate append.
Question 44 of 60 · Apache Kafka cluster architecture · Hard
A topic has replication factor 3 and min.insync.replicas=2. The producer uses acks=all. One replica becomes unavailable, but the leader and one follower remain in the ISR. What is the expected result for new writes?
Not quite. Try another option.
Answer: Writes continue because the ISR still meets the minimum
With acks=all, the leader requires acknowledgments from the current ISR. Since the ISR contains two replicas and the minimum is two, new writes can succeed.
Question 45 of 60 · Apache Kafka cluster architecture · Hard
A topic's partitions are distributed across three brokers, but each partition's leader and its first replica are placed in the same rack. What is the main unresolved availability risk?
Not quite. Try another option.
Answer: A rack failure can remove leaders for multiple partitions
Replica distribution across brokers does not automatically provide rack-level fault isolation. If leaders and their replicas share a rack, one rack failure can affect leadership and availability for many partitions.
Question 46 of 60 · Apache Kafka cluster architecture · Hard
A consumer group has eight consumers assigned to a topic with five partitions. Assuming no idle or standby assignment behavior, what is the most accurate result?
Not quite. Try another option.
Answer: Five consumers receive one partition and three remain idle
Within a consumer group, each partition is assigned to at most one consumer. Therefore, no more than five consumers can actively consume this five-partition topic at once.
Question 47 of 60 · Apache Kafka installation · Hard
A Kafka installation is configured with a listener advertised as PLAINTEXT://localhost:9092, and remote Spark executors attempt to connect using the broker metadata. The TCP port is reachable, but clients still fail after metadata retrieval. What is the most likely cause?
Not quite. Try another option.
Answer: The broker advertises an address unreachable from executors
Kafka clients use advertised listener addresses returned in metadata for subsequent broker connections. Advertising localhost causes remote clients to resolve the broker as themselves rather than the Kafka host.
Question 48 of 60 · Apache Kafka installation · Hard
An administrator starts a Kafka broker in KRaft mode but supplies only a broker process role and no controller quorum configuration. Which outcome is expected in a standard combined-node deployment?
Not quite. Try another option.
Answer: The broker cannot form or join the required controller quorum
KRaft requires explicit controller quorum configuration and appropriate process roles. Without controller information, the node cannot participate in metadata management or form the quorum.
Question 49 of 60 · Apache Kafka installation · Hard
A broker is configured with a log directory on a nearly full disk. Kafka begins rejecting new records even though topic-level retention appears correct. Which operational explanation is most plausible?
Not quite. Try another option.
Answer: Kafka protects the broker using disk-based log directory failure thresholds
Kafka monitors log-directory availability and can treat a directory as failed or stop accepting writes when storage is exhausted. Retention settings do not guarantee immediate space reclamation.
Question 50 of 60 · Integration of Apache Kafka with Spark · Hard
A Structured Streaming query reads Kafka records, performs a deterministic transformation, and writes to an idempotent external sink. The query fails after the sink write but before the Spark checkpoint is updated. What behavior should the sink support?
Not quite. Try another option.
Answer: It should tolerate replayed records using deterministic keys
The source may replay records because the checkpoint did not advance. An idempotent sink can use stable event identifiers or offsets as keys to make repeated writes produce the same final state.
Question 51 of 60 · Integration of Apache Kafka with Spark · Hard
A Spark Structured Streaming job reads from Kafka with startingOffsets=latest, but the query is restarted after its checkpoint directory is deleted. New records arrive during startup. Which result is expected?
Not quite. Try another option.
Answer: The query begins near the latest offsets observed at initialization
For a new query without a checkpoint, startingOffsets=latest begins from the latest available offsets when the source initializes. A checkpoint, when present, takes precedence over this option.
Question 52 of 60 · Integration of Apache Kafka with Spark · Hard
A Kafka topic has 100 partitions, but a Spark streaming query is limited by maxOffsetsPerTrigger to 10,000 records. If partition rates are highly skewed, what limitation can this setting introduce?
Not quite. Try another option.
Answer: A global cap can delay high-volume partitions disproportionately
The cap limits the total records processed per trigger. Allocation across partitions may be rate-weighted rather than equal, so skew and allocation decisions can cause some high-volume partitions to accumulate lag.
Question 53 of 60 · Integration of Apache Kafka with Spark · Hard
A Spark job reads Kafka data, applies a stateful aggregation, and is configured with a short trigger interval. Processing time regularly exceeds the trigger interval. What is the most likely consequence?
Not quite. Try another option.
Answer: Micro-batches queue behind one another and latency increases
Triggers schedule processing but do not force parallel execution of overlapping micro-batches for one query. If processing takes longer than the interval, effective latency and backlog increase.
Question 54 of 60 · Producer and consumer messaging model · Hard
Two consumers belong to the same Kafka consumer group and process different partitions. Consumer A commits offset 120 for partition 0, while Consumer B fails before committing offset 85 for partition 1. After rebalance, what does the group normally resume from?
Not quite. Try another option.
Answer: Offset 120 for partition 0 and the last committed offset for partition 1
Offsets are committed per topic-partition, not as one global group position. Partition 0 uses its committed offset, while partition 1 reprocesses data after its own last committed offset.
Question 55 of 60 · Producer and consumer messaging model · Hard
A consumer processes a record for 40 seconds, while max.poll.interval.ms is 30 seconds. The consumer continues sending heartbeats but does not call poll during processing. What is the likely result?
Not quite. Try another option.
Answer: The consumer may be removed from the group for exceeding poll interval
max.poll.interval.ms limits the time between application poll calls. Heartbeats maintain session liveness but do not satisfy the processing-progress requirement enforced by the poll interval.
Question 56 of 60 · Producer and consumer messaging model · Hard
A producer sends keyed events to a partition. Retries are enabled, but idempotence is disabled. A transient acknowledgment failure causes a retry after the first append succeeded. Which issue is possible?
Not quite. Try another option.
Answer: The same event can appear twice in the partition log
Without idempotence, the producer cannot prevent a retry from being appended after an earlier attempt already succeeded. Kafka preserves both records unless application-level deduplication is used.
Question 57 of 60 · Kafka pipeline · Hard
A pipeline consumes clickstream events, enriches them, and republishes results to a second Kafka topic. The enrichment service is nondeterministic and the output topic is compacted. Which design most reliably supports replay without inconsistent final state?
Not quite. Try another option.
Answer: Persist deterministic enrichment inputs and use stable output keys
Replay can repeat processing, and nondeterministic enrichment can change results. Stable keys and reproducible inputs allow later records to represent the intended final state in a compacted topic.
Question 58 of 60 · Kafka pipeline · Hard
A Kafka pipeline has a source topic, a stream processor, and a sink topic. The processor commits source offsets before publishing sink records. If it crashes immediately afterward, what failure mode is most likely?
Not quite. Try another option.
Answer: Records can be lost because committed offsets hide unpublished output
Committing before the sink write means a crash can advance the source position without producing the corresponding output. Restarted processing skips those records.
Question 59 of 60 · Kafka pipeline · Hard
A pipeline uses a compacted Kafka topic for the latest customer profile. A tombstone for customer C7 is produced, but downstream consumers start after the tombstone has been removed. What conclusion is correct?
Not quite. Try another option.
Answer: The consumer may retain stale state unless it rebuilt from a valid snapshot
Compaction eventually removes tombstones after the configured delay. A consumer that missed the tombstone may not learn about the deletion unless it has another authoritative state-rebuild mechanism.
Question 60 of 60 · Ingestion patterns · Hard
A Spark streaming application must ingest a bursty Kafka workload while preventing a temporary spike from exhausting executor memory. Which strategy is most appropriate?
Not quite. Try another option.
Answer: Bound records per trigger and allow Kafka lag to absorb bursts
A per-trigger ingestion limit, such as maxOffsetsPerTrigger, controls batch size and memory pressure. Unprocessed records remain in Kafka and contribute to lag until capacity catches up.
That's unit 5
Answer a few questions and your score shows up here.
Nearly through. Did unit 5 of INT315 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 5 of INT315 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.