Integration / Apache Pulsar Interview questions
How does Pulsar handle delayed message delivery?
A producer can mark an individual message with a delay (a duration or an absolute delivery time), and the broker holds that message out of normal dispatch until the delay elapses, at which point it becomes visible to consumers like any other message.
Internally, delayed messages are tracked in a time-indexed structure the broker consults on each dispatch cycle, checking whether any delayed messages have now become due, rather than the message sitting unusably in the ledger until manually re-checked by a client.
This is commonly used for scheduling retries with backoff, deferred notifications, or workflow steps that need to fire at a specific future time, without needing an external scheduler service.
More Related questions...