{"record":{"id":"0f7402bed8063c05","repo":"aeron-io/aeron","slug":"unknown-subscription-registrationid-driverconductor","errorCode":null,"errorMessage":"unknown subscription: {registrationId}","messagePattern":"unknown subscription: (.+?)","errorType":"exception","errorClass":"UnknownSubscriptionException","httpStatus":null,"severity":"error","filePath":"aeron-driver/src/main/java/io/aeron/driver/DriverConductor.java","lineNumber":3374,"sourceCode":"\n            return State.DONE == state;\n        }\n\n        private void init()\n        {\n            for (int i = 0, size = subscriptionLinks.size(); i < size; i++)\n            {\n                final SubscriptionLink subscriptionLink = subscriptionLinks.get(i);\n                if (registrationId == subscriptionLink.registrationId())\n                {\n                    receiveChannelEndpoint = subscriptionLink.channelEndpoint();\n                    break;\n                }\n            }\n\n            if (null == receiveChannelEndpoint)\n            {\n                throw new UnknownSubscriptionException(\"unknown subscription: \" + registrationId);\n            }\n\n            receiveChannelEndpoint.validateAllowsDestinationControl();\n\n            parseChannelResult = nativeResourceAgentProxy.parseChannel(destinationChannel, true);\n\n            state = State.AWAITING_CHANNEL_PARSE;\n        }\n\n        private void awaitingChannelParse()\n        {\n            if (null != (udpChannel = parseChannelResult.get()))\n            {\n                state = State.REMOVING;\n            }\n        }\n\n        private void removing()","sourceCodeStart":3356,"sourceCodeEnd":3392,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-driver/src/main/java/io/aeron/driver/DriverConductor.java#L3356-L3392","documentation":"Thrown when adding a destination to a subscription (non-spy path) but no receiveChannelEndpoint can be resolved for the given subscription registrationId. The driver searched its subscription links for an endpoint matching the id and found none, meaning the subscription is unknown or has no bound channel endpoint.","triggerScenarios":"Calling addRcvDestination with a registrationId that has no receive channel endpoint in this driver — unknown id, subscription closed, or subscription created with a URI that never created an endpoint (e.g. spy-only).","commonSituations":"Passing the wrong handle/id after a client reconnect; operating on a subscription closed by another thread; using a spy subscription id for a network destination call.","solutions":["Verify the registrationId belongs to an active network subscription in the same driver instance.","Ensure the subscription was added with a network channel (not spy) so it owns a receiveChannelEndpoint.","Catch UnknownSubscriptionException and re-create the subscription, then add destinations to the new id.","Check driver logs for the subscription close event that invalidated the id."],"exampleFix":"// before\nlong id = oldClosedSubscription.registrationId();\ndriverProxy.addRcvDestination(id, destinationChannel); // unknown\n// after\nlong id = aeron.addSubscription(\"aeron:udp?endpoint=0.0.0.0:40456|control-mode=manual\", streamId);\ndriverProxy.addRcvDestination(id, destinationChannel);","handlingStrategy":"try-catch","validationCode":"if (registrationId == 0 || closedSubscriptions.contains(registrationId)) { throw new IllegalStateException(\"subscription not active\"); }","typeGuard":null,"tryCatchPattern":"try {\n    driverProxy.addRcvDestination(subscriptionId, destination);\n} catch (UnknownSubscriptionException e) {\n    subscriptionId = aeron.addSubscription(channelUri, streamId);\n    driverProxy.addRcvDestination(subscriptionId, destination);\n}","preventionTips":["Track subscription lifecycle (added/active/closed) in your client","Use network (non-spy) subscriptions for network destination management","Re-acquire ids after client reconnects"],"tags":["aeron","driver","subscription"],"backgroundTag":"resource-not-found","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}