Integration / Apache Pulsar Interview questions
What is the difference between persistent and non-persistent topics?
Persistent topics durably store every message in BookKeeper before acknowledging the publish, so data survives broker restarts, and slow consumers can catch up later from the retained backlog.
Non-persistent topics keep messages only in broker memory and never touch BookKeeper, trading that durability for lower publish latency and zero storage overhead - a broker restart loses any in-flight messages with no way to recover them.
Because of this, non-persistent topics suit only data where occasional loss is acceptable in exchange for speed, while persistent topics are the default choice for anything that must not silently disappear.
| Persistent | Non-persistent |
| Stored durably in BookKeeper | Held only in broker memory |
| Survives broker restarts | Lost on broker restart |
| Higher publish latency, durable | Lower latency, not durable |
More Related questions...