Skip to main content
Yukta has two different mechanisms for doing something again. Choosing the right one matters.

Engine retry

A retry reruns a failed attempt with exponential backoff and jitter. It is for transient faults, not for waiting.
A plugin that reports invalid input is never retried. Because a retry can show the same message twice, make downstream side effects idempotent on the message id. See Failure handling.

Poll until a condition holds

LOOP_PREDICATE wraps another plugin, runs it repeatedly and stops when an exit condition is true or a bound is reached. This example polls a command until it has run three times, one second apart, and never runs more than five times or longer than one minute:
Always set maxIterations and maxDuration. A loop without a bound that never meets its condition runs until the node’s time limits end it.

Stream every result

LOOP_STREAM runs the target repeatedly and emits each result as its own message, so downstream nodes process results as they arrive. Use it for paging through results or generating a series of items.

Time limits still apply

A loop is one node, so the node’s idle timeout and deadlineMs bound it. Raise timeoutSeconds for long polling, or have the plugin report progress so its idle clock restarts; see Time limits.