fix(chart): use correct Bull queue key bull:jobs:wait in KEDA examples - #174
Merged
Conversation
The KEDA Redis-list scaler examples pointed at bull:default:wait, but n8n names its Bull queue 'jobs' (QUEUE_NAME = 'jobs'), with default prefix 'bull'. Bull composes keys as <prefix>:<queueName>:<state>, so the waiting-list key is bull:jobs:wait. As written, LLEN bull:default:wait always returns 0, so queue-depth autoscaling never fires and the ScaledObject silently falls back to any other triggers. Prefix stays overridable via QUEUE_BULL_PREFIX. Fixes #173 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
The KEDA Redis trigger's listName is passed through to the ScaledObject verbatim and does not derive from redis.prefix. n8n writes the Bull key as <prefix>:jobs:wait, so a customized redis.prefix desyncs it from the default bull:jobs:wait and queue-depth autoscaling stops firing. Document that the two must be kept in sync (addresses cubic review on #174). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The KEDA autoscaling examples pointed the Redis-list scaler at
bull:default:wait, but n8n names its Bull queuejobs, notdefault. Bull composes keys as<prefix>:<queueName>:<state>, so the waiting-list key isbull:jobs:wait.As written,
LLEN bull:default:waitalways returns 0, so queue-depth autoscaling never fires — the ScaledObject silently falls back to whatever other triggers are configured.Why
bull:jobs:waitFrom n8n source (n8n-io/n8n):
packages/cli/src/scaling/constants.ts—export const QUEUE_NAME = 'jobs';packages/cli/src/scaling/scaling.service.ts—new BullQueue(QUEUE_NAME, { prefix, ... })packages/@n8n/config/src/configs/scaling-mode.config.ts— default prefixbull(docstring@example 'bull:jobs:23')The prefix is still overridable via
QUEUE_BULL_PREFIX. This matches the correct key already used by the #169 ECS Fargate Lambda — this is the chart side of the same key.Changes
Find/replace
bull:default:wait→bull:jobs:wait(one occurrence each):charts/n8n/values.yamlcharts/n8n/examples/keda-autoscaling.yamlcharts/n8n/README.mdhelm lint charts/n8npasses.Fixes #173
🤖 Generated with Claude Code
Summary by cubic
Point the KEDA Redis-list scaler to the correct Bull key
bull:jobs:waitso queue-length autoscaling works with n8n’sjobsqueue. Clarifies thatlistNamemust be<prefix>:jobs:wait(prefix defaults tobull) and must stay in sync withredis.prefixto avoid missed scaling.Written for commit ce6b743. Summary will update on new commits.