| Kafka streams | Spark Streaming |
|---|---|
| Able to handle only real-time streams | Can handle real-time streams as well as batch processes. |
| The use of partitions and their replicas allows Kafka to be fault-tolerant. | Spark allows recovery of partitions using Cache and RDD (resilient distributed dataset) |
| Kafka does not provide any interactive modes. The broker simply consumes the data from the producer and waits for the client to read it. | Has interactive modes |
| Messages remain persistent in the Kafka log. | A dataframe or some other data structure has to be used to keep the data persistent. |