Skip to main content


While is a processor that checks a Bloblang query against messages and executes child processors on them for as long as the query resolves to true.

# Common config fields, showing default values
label: ""
at_least_once: false
check: ""
processors: []

The field at_least_once, if true, ensures that the child processors are always executed at least one time (like a do .. while loop.)

The field max_loops, if greater than zero, caps the number of loops for a message batch to this value.

If following a loop execution the number of messages in a batch is reduced to zero the loop is exited regardless of the condition result. If following a loop execution there are more than 1 message batches the query is checked against the first batch only.



Whether to always run the child processors at least one time.

Type: bool
Default: false


An optional maximum number of loops to execute. Helps protect against accidentally creating infinite loops.

Type: int
Default: 0


A Bloblang query that should return a boolean value indicating whether the while loop should execute again.

Type: string
Default: ""

# Examples
check: errored()
check: this.urls.unprocessed.length() > 0


A list of child processors to execute on each loop.

Type: array
Default: []