{"record":{"id":"d2c8eda7ba9a42bd","repo":"mastra-ai/mastra","slug":"orchestrationworker-requires-a-pull-capable-pubsub","errorCode":null,"errorMessage":"OrchestrationWorker requires a pull-capable PubSub, but the configured pubsub only supports: ${modes.join(', ')}. Either remove OrchestrationWorker from the workers list or use a pull-capable PubSub (e.g. Redis Streams).","messagePattern":"OrchestrationWorker requires a pull-capable PubSub, but the configured pubsub only supports: (.+?)\\. Either remove OrchestrationWorker from the workers list or use a pull-capable PubSub \\(e\\.g\\. Redis Streams\\)\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/worker/workers/orchestration-worker.ts","lineNumber":52,"sourceCode":"\n  constructor(config: OrchestrationWorkerConfig = {}) {\n    super();\n    this.#config = config;\n  }\n\n  async init(deps: WorkerDeps): Promise<void> {\n    await super.init(deps);\n\n    if (!deps.mastra) {\n      throw new Error('OrchestrationWorker requires Mastra instance');\n    }\n\n    // OrchestrationWorker drives a pull subscription on the workflow topic.\n    // Push-only pubsubs (EventEmitter, GCP push subscriptions) deliver events\n    // through different paths and must not be paired with this worker.\n    const modes = deps.pubsub.supportedModes ?? ['pull'];\n    if (!modes.includes('pull')) {\n      throw new Error(\n        `OrchestrationWorker requires a pull-capable PubSub, but the configured pubsub only supports: ${modes.join(', ')}. ` +\n          `Either remove OrchestrationWorker from the workers list or use a pull-capable PubSub (e.g. Redis Streams).`,\n      );\n    }\n\n    // If MASTRA_STEP_EXECUTION_URL is set, use HttpRemoteStrategy\n    // (standalone worker calling back to the server for step execution).\n    // The strategy reads MASTRA_WORKER_AUTH_TOKEN itself and forwards it\n    // through the server's normal Mastra auth provider — there is no\n    // separate \"worker secret\" gate.\n    const remoteUrl = process.env.MASTRA_STEP_EXECUTION_URL;\n    if (remoteUrl) {\n      this.#strategy = new HttpRemoteStrategy({\n        serverUrl: remoteUrl,\n      });\n    }\n\n    this.#processor = new WorkflowEventProcessor({","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/worker/workers/orchestration-worker.ts#L34-L70","documentation":"OrchestrationWorker uses a pull subscription on the workflow topic (PullTransport). init() inspects pubsub.supportedModes (defaulting to ['pull']) and throws when 'pull' is not supported, because push-only transports (EventEmitter, GCP push) would never deliver events to this worker's polling loop.","triggerScenarios":"Configuring OrchestrationWorker with a push-only PubSub implementation whose supportedModes excludes 'pull' — e.g. an EventEmitter-based pubsub or a GCP push subscription — and calling init().","commonSituations":"Dev setups using the in-memory/EventEmitter pubsub while deploying an OrchestrationWorker; GCP PubSub push subscriptions; copying pubsub config from a push-based worker to the orchestration worker.","solutions":["Swap to a pull-capable PubSub such as Redis Streams (or another supportedModes including 'pull')","Remove OrchestrationWorker from the workers list if your infra is push-only and handle workflows in-process instead","Explicitly verify pubsub.supportedModes in your config wiring before startup","For local dev, use a local Redis so the Redis Streams pubsub can run in pull mode"],"exampleFix":"// before\nnew OrchestrationWorker({ name: 'orchestrator', pubsub: new EventEmitterPubSub() })\n// after\nnew OrchestrationWorker({ name: 'orchestrator', pubsub: new RedisStreamsPubSub({ url: process.env.REDIS_URL }) })","handlingStrategy":"validation","validationCode":"const modes = pubsub.supportedModes ?? ['pull'];\nif (!modes.includes('pull')) throw new Error('OrchestrationWorker needs a pull-capable pubsub');","typeGuard":"function isPullCapable(p) { return (p.supportedModes ?? ['pull']).includes('pull'); }","tryCatchPattern":"try {\n  await worker.init(deps);\n} catch (e) {\n  if (e.message.includes('pull-capable PubSub')) {\n    logger.error('Replace pubsub with Redis Streams or remove OrchestrationWorker');\n  } else throw e;\n}","preventionTips":["Check supportedModes in CI/config tests before deploy","Use Redis Streams (or another pull-capable pubsub) wherever OrchestrationWorker is registered","Never pair push-only transports (EventEmitter, GCP push) with pull-based workers"],"tags":["pubsub","worker","configuration","incompatible-transport"],"backgroundTag":"incompatible-pubsub-mode","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}