Pulsar

Global Tick Cycle Limit

Set a maximum ceiling on total tick executions across all queues per cycle.

The cycleTickLimit property sets a global cap on the total number of tick executions allowed across all queues within a single execution run.

Once the cumulative tick count reaches this threshold, the engine cleanly terminates the current cycle and triggers a self-invocation restart.

Usage

Pass cycleTickLimit inside the engine configuration object:

const engine = new Pulsar({
  runtime: PulsarRuntime.SERVERLESS,
  engine: {
    cycleTickLimit: 10, 
  },
});

Configuration Reference

  • Default: Infinity (No global limit)

Execution Behavior by Concurrency Mode

How cycleTickLimit distributes ticks across your queues depends directly on your configured tickConcurrency.

Sequential Mode (tickConcurrency: "sequential")

Ticks are processed strictly one by one in predictable order. With 10 queues and cycleTickLimit: 10, each queue executes exactly 1 tick before the engine terminates the cycle.

Parallel Mode (tickConcurrency: "parallel")

Ticks across queues execute concurrently without strict round-robin fair distribution. Fast-completing queues may process multiple ticks while slower queues are still finishing their first.

cycleTickLimit tracks total cumulative ticks across the engine instance, regardless of which individual queues executed them.

On this page