The queue.pop: command reads messages from a queue.



start:
  queue.pop:
    inputs:
      queue_name: example.queue.name
      limit: 1
    output: results


Syntax

inputs:

Key  
queue_name: The queue name to read messages from
limit: The maximum number of messages to retrieve at once

output:

Save the metrics result to this placeholder.

on_simulate:

The commands to run during simulation instead of reading messages from the queue.

If omitted, messages are read from the queue during simulation.

on_success:

The commands to run on success.

The output: placeholder receives a dictionary with these keys:

Key  
consumer_id The unique consumer ID key used to reserve the read messages. This is used to mark queue messages as successful or failed.
messages An array of messages. The key is the unique queue message ID and the value is a dictionary with keys for queue: and data:

For example:



results:
  consumer_id: "0x1ec8aee9cb856fd48e0a8d3225229102"
  messages:
    1ec8aedf82d0642e858367a0b25a73aa:
      queue: example.queue.name
      data:
        id: message0
        priority: high


on_error:

The commands to run on failure. If omitted, the automation exits in the error state.

The output: placeholder receives a dictionary with these keys:

Key  
error The error message.