Commands icon
If icon
SlackIncomingWebhook icon
Schedule icon

Apache Pulsar Message Backlog Quota and Retention Headroom Sentinel

Monitors Apache Pulsar namespace message backlog quotas to prevent publisher throttling and message loss.

Categories
DataInfrastructure

How it works

This workflow connects to the Apache Pulsar Admin REST API (/admin/v2/namespaces/{tenant}/{namespace}/stats) to monitor total unconsumed message backlog sizes against configured backlogQuota storage limits. When consumers stall or disconnect, messages accumulate across BookKeeper ledger bookies. If the backlog reaches the namespace limit, Pulsar enforces the configured policy (such as producer_request_hold which throttles publishers, or consumer_backlog_eviction which silently discards the oldest unacknowledged messages). This workflow detects quota saturation and alerts streaming operations before data loss occurs.

What you get

  • Real-time detection of unconsumed message accumulation in Apache Pulsar.
  • Prevents producer throttling stalls and silent message eviction.
  • Actionable visibility into namespace storage limits.

Who it's for

  • Event Streaming Platform Engineers and Messaging Architects.
  • SREs maintaining mission-critical Apache Pulsar clusters.

Why orchestrate this with Kestra

  • Continuous Streaming Assurance: Automatically audits message broker headroom.
  • Secure Token Handling: Safely injects Pulsar JWT tokens via Kestra secret store.
  • Instant Team Escalation: Delivers notifications with backlog sizes directly to Slack.

Prerequisites

  • Apache Pulsar cluster with Admin REST endpoint accessible.
  • Secrets PULSAR_AUTH_TOKEN and SLACK_WEBHOOK configured in Kestra.

Quick start

  1. Import the blueprint.
  2. Input Pulsar Admin URL, tenant, and namespace.
  3. Run the workflow to inspect backlog quota metrics.

How to extend

  • Query subscription-specific backlog counts to identify the exact lagging consumer group.
  • Automatically scale consumer pod replicas via Kubernetes HPA when backlog expands.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.