Pulsar

Pooler

Configure how the queue fetches and listens for incoming work from storage.

The pooler property dictates the strategy a queue uses to discover and retrieve pending jobs from storage.

Pulsar supports two distinct pooling modes: Interval-Driven Pooling (IDP) for continuous, time-paced processing, and Event-Driven Pooling (EDP) for immediate, event-triggered execution.

Usage

Pass pooler inside the createQueue configuration object:

export const Queue3 = createQueue({
  queue: "q_3",
  type: "STANDARD",
  pooler: "interval-driven-pooler", 
  // ... other queue options
});

Configuration Options

1. Interval Driven Pooler (IDP) — Default

The engine polls storage at scheduled intervals dictated by the queue's profile settings.

  • Best For: Steady, high-volume, or predictable background workloads requiring continuous batch processing.
  • Behavior: Consistently polls the queue according to configured timing intervals (activePollMs, idlePollMs).
  • Core Concept Reference: Learn more about interval polling strategies in the Interval-Driven Pooler Guide.

2. Event Driven Pooler (EDP)

The engine listens directly for storage events/notifications (such as Postgres LISTEN/NOTIFY or database triggers) and immediately dispatches workers when new jobs arrive.

  • Best For: Bursty or sporadic workloads where instant, low-latency execution is required while driving idle execution overhead down to zero.
  • Behavior: Remains dormant until triggered by an incoming event notification, eliminating unnecessary polling queries during idle periods.
  • Core Concept Reference: Learn more about event-based reactivity in the Event-Driven Pooler Guide.

Comparison Matrix

Pooling ModeTrigger StrategyIdle Query OverheadPickup LatencyIdeal Use Case
interval-driven-poolerTimed Interval PollingRegular Low-Cost PollsPredictable (Interval-bound)Continuous / Batch Background Jobs
event-driven-poolerStorage Event NotificationsZero Idle PollsNear Instantaneous (< 10ms)Real-time, Sporadic, or Interactive Tasks

For deep architectural breakdowns, performance comparisons, and setup considerations, refer to the dedicated Core Concepts guides for Interval-Driven Pooling and Event-Driven Pooling.


On this page