Skip to contents

Enqueue a payload for async processing

Usage

payload_queue(path, payload, priority = c("normal", "high", "low"),
  correlation_id = NULL)

Arguments

path

The endpoint path this payload is associated with

payload

The payload data to queue

priority

Queue priority: "high", "normal", or "low" (default "normal")

correlation_id

Optional correlation ID for tracking

Value

A list with success status and queue_id if successful

Examples

if (interactive()) {
  # Enqueue a payload
  result <- payload_queue("/api/process", list(data = "test"))
  if (result$success) {
    cat("Queued with ID:", result$queue_id, "\n")
  }
}