Integration / Apache Pulsar Interview questions
How do you troubleshoot a growing backlog in Pulsar?
Start by identifying whether the backlog growth is on a specific subscription or across the whole topic - per-subscription backlog metrics will show whether one consumer group is falling behind while others keep pace, pointing at a consumer-side problem rather than a producer or broker issue.
Check whether consumers are actually connected and actively acknowledging: a subscription with zero connected consumers, or consumers stuck failing to process messages and repeatedly nacking or timing out, will show backlog climbing steadily with no processing happening at all.
If consumers are connected but processing slowly, compare consumption rate against publish rate directly - a sustained mismatch means you need more parallel consumers (on Shared/Key_Shared) or need to speed up per-message processing, not just wait it out.
Rule out downstream issues in consumer application logic itself, such as a slow external call or a poison-pill message causing repeated failures and redelivery loops, by checking consumer-side logs and negative-acknowledgment/redelivery counts - a backlog can also be a symptom of one bad message stuck in a redelivery loop rather than genuinely high volume.
If backlog quota is configured, also confirm it hasn't already been hit and started blocking producers or evicting messages, which changes the nature of the problem from "processing is behind" to "data is actively being lost or refused."
More Related questions...