{"product_id":"redis-priority-job-queue-for-n8n-workers-anthropic-llm","title":"Redis Priority Job Queue for n8n Workers + Anthropic LLM","description":"\u003ch3\u003eRedis Priority Job Queue for n8n Workers + Anthropic LLM — lane-based scheduling with Redis, worker wakeups, and HTTP\/webhook control\u003c\/h3\u003e\n\u003cp\u003eTurn your n8n into a reliable distributed task runner: enqueue priority jobs into Redis, wake workers when work arrives, and (optionally) execute \u003cstrong\u003eAnthropic\u003c\/strong\u003e LLM jobs or outbound HTTPS calls—complete with idempotency, TTL storage, leases, and webhook-based status\/cancel endpoints.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eEnqueue jobs via webhook:\u003c\/strong\u003e Accepts a POST to \u003ccode\u003e\/webhook\/queue-enqueue\u003c\/code\u003e, validates job type, priority, payload size, delay, and attempts, then creates a job record with a token for deduping\/fencing.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIdempotent submission:\u003c\/strong\u003e Checks Redis for an existing \u003ccode\u003ejob:{jobId}\u003c\/code\u003e record and returns a duplicate response if the job already exists.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePriority lanes + delayed scheduling:\u003c\/strong\u003e Stores jobs in Redis with a TTL, either pushing delayed work to \u003ccode\u003equeue:scheduled\u003c\/code\u003e or routing immediate jobs into one of \u003ccode\u003equeue:critical\u003c\/code\u003e, \u003ccode\u003equeue:high\u003c\/code\u003e, \u003ccode\u003equeue:normal\u003c\/code\u003e, or \u003ccode\u003equeue:low\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWorker wakeups and polling:\u003c\/strong\u003e Wakes workers using Redis Trigger notifications or a 10-second schedule, then polls lanes in priority order with an anti-starvation rotation every N polls.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAtomic claiming + execution:\u003c\/strong\u003e Loads and validates the job record using the message token, claims it with a lease, registers it in \u003ccode\u003equeue:processing\u003c\/code\u003e, then executes:\n    \u003cul\u003e\n      \u003cli\u003e\n\u003cstrong\u003ellm\u003c\/strong\u003e: calls the \u003cstrong\u003eAnthropic Messages API\u003c\/strong\u003e\n\u003c\/li\u003e\n      \u003cli\u003e\n\u003cstrong\u003ehttp\u003c\/strong\u003e: performs an outbound HTTPS request\u003c\/li\u003e\n      \u003cli\u003e\n\u003cstrong\u003enoop\u003c\/strong\u003e: runs a no-op echo handler\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eJob lifecycle endpoints:\u003c\/strong\u003e Includes webhook endpoints to check queue\/job status and cancel queued or delayed jobs.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eQueue \u003cstrong\u003epriority background tasks\u003c\/strong\u003e across multiple n8n workers without losing ordering guarantees.\u003c\/li\u003e\n  \u003cli\u003eRun \u003cstrong\u003eAnthropic LLM\u003c\/strong\u003e generations asynchronously with controlled retries\/attempts and leasing.\u003c\/li\u003e\n  \u003cli\u003eSafely manage delayed work (scheduling + cancellation) from external systems via webhooks.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRedis\u003c\/strong\u003e: job records (\u003ccode\u003ejob:{jobId}\u003c\/code\u003e), lane lists (\u003ccode\u003equeue:critical\u003c\/code\u003e\/\u003ccode\u003equeue:high\u003c\/code\u003e\/\u003ccode\u003equeue:normal\u003c\/code\u003e\/\u003ccode\u003equeue:low\u003c\/code\u003e), scheduled queue (\u003ccode\u003equeue:scheduled\u003c\/code\u003e), and processing registration (\u003ccode\u003equeue:processing\u003c\/code\u003e), plus pub\/sub notifications.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes\u003c\/strong\u003e: \u003ccode\u003ewebhook\u003c\/code\u003e, \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003eset\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003eredis\u003c\/code\u003e, \u003ccode\u003eswitch\u003c\/code\u003e, \u003ccode\u003eredis\u003c\/code\u003e-based triggers\/scheduling.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations\u003c\/strong\u003e: \u003cstrong\u003eAnthropic Messages API\u003c\/strong\u003e (for \u003ccode\u003ellm\u003c\/code\u003e) and outbound \u003cstrong\u003eHTTPS\u003c\/strong\u003e calls (for \u003ccode\u003ehttp\u003c\/code\u003e).\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46154018455731,"sku":"N8N-20287","price":45.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/4hmEt6mvVjCGXPLaa8CP2_eoA6eY8C.png?v=1790932703","url":"https:\/\/buyflowscripts.com\/products\/redis-priority-job-queue-for-n8n-workers-anthropic-llm","provider":"N8N Commerce","version":"1.0","type":"link"}