{"record":{"id":"4499c7558f9c8641","repo":"ruvnet/ruflo","slug":"maximum-subscriptions-reached-for-resource-uri","errorCode":null,"errorMessage":"Maximum subscriptions reached for resource: ${uri}","messagePattern":"Maximum subscriptions reached for resource: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/mcp/src/resource-registry.ts","lineNumber":212,"sourceCode":"        ttl: this.options.cacheTTL,\n      });\n    }\n\n    this.emit('resource:read', { uri, contentCount: contents.length });\n    return { contents };\n  }\n\n  /**\n   * Subscribe to resource updates\n   */\n  subscribe(uri: string, callback: SubscriptionCallback): string {\n    if (!this.options.enableSubscriptions) {\n      throw new Error('Subscriptions are disabled');\n    }\n\n    const existingSubs = this.subscriptions.get(uri) || [];\n    if (existingSubs.length >= this.options.maxSubscriptionsPerResource) {\n      throw new Error(`Maximum subscriptions reached for resource: ${uri}`);\n    }\n\n    const subscriptionId = `sub-${++this.subscriptionCounter}-${Date.now()}`;\n    const subscription: Subscription = {\n      id: subscriptionId,\n      uri,\n      callback,\n      createdAt: new Date(),\n    };\n\n    existingSubs.push(subscription);\n    this.subscriptions.set(uri, existingSubs);\n\n    this.logger.debug('Subscription created', { subscriptionId, uri });\n    this.emit('subscription:created', { subscriptionId, uri });\n\n    return subscriptionId;\n  }","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/mcp/src/resource-registry.ts#L194-L230","documentation":"Thrown by subscribe when the number of existing subscription callbacks for the given resource URI has already reached options.maxSubscriptionsPerResource; the registry refuses further subscriptions to that URI to cap fan-out, while subscriptions to other URIs remain unaffected.","triggerScenarios":"Thrown at v3/@claude-flow/mcp/src/resource-registry.ts:212 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Unsubscribe unused subscriptions for the resource before adding new ones.","Raise the per-resource subscription limit if the higher fan-out is intended."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}