What are some of the challenges associated with using Kafka Streams?

Kafka Streams offers powerful stream processing built directly into Kafka, but that convenience comes with real challenges around state management, correctness guarantees, and operational complexity for large or high-throughput applications.

Key Points

Example

A team running a Kafka Streams application performing large windowed aggregations over millions of unique keys might find RocksDB disk usage and changelog topic size growing faster than expected, requiring careful tuning of retention and state store configuration.

// Settings that address common Kafka Streams problems
Properties props = new Properties();
props.put(StreamsConfig.APPLICATION_ID_CONFIG, "order-aggregator");
props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");

// Exactly-once processing (needs brokers 2.5+)
props.put(StreamsConfig.PROCESSING_GUARANTEE_CONFIG, StreamsConfig.EXACTLY_ONCE_V2);

// Faster recovery after a crash: keep a standby copy of each state store
props.put(StreamsConfig.NUM_STANDBY_REPLICAS_CONFIG, 1);

// Put RocksDB state on a fast, persistent disk instead of /tmp
props.put(StreamsConfig.STATE_DIR_CONFIG, "/data/kafka-streams");

// Bad records: log and skip instead of stopping the whole application
props.put(StreamsConfig.DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG,
          LogAndContinueExceptionHandler.class);

Interview Tip

A concise interview answer is

The main challenges with Kafka Streams are managing state store size and durability at scale, getting exactly-once semantics right without hurting latency, and the general difficulty of debugging a distributed, stateful processing topology, all of which require a solid understanding of Kafka's own internals to tune effectively.

Last updated: 1 November 2026

Previous question: How does Kafka Streams handle state?

Next question: How do you secure a Kafka cluster?

More Kafka (Optional) interview questions

All Kafka (Optional) questions