{"record":{"id":"59a0714a31ae4e73","repo":"aeron-io/aeron","slug":"image-correlationid-responsecorrelationid-did-not-request-a","errorCode":null,"errorMessage":"image.correlationId={responseCorrelationId} did not request a response channel","messagePattern":"image\\.correlationId=(.+?) did not request a response channel","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"aeron-driver/src/main/java/io/aeron/driver/DriverConductor.java","lineNumber":2787,"sourceCode":"                    \"control-mode=response was specified, but no response-correlation-id set\");\n            }\n\n            if (PROTOTYPE_VALUE_CORRELATION_ID == params.responseCorrelationId)\n            {\n                return null;\n            }\n\n            for (final PublicationImage publicationImage : publicationImages)\n            {\n                if (publicationImage.correlationId() == params.responseCorrelationId)\n                {\n                    if (publicationImage.hasSendResponseSetup())\n                    {\n                        return publicationImage;\n                    }\n                    else\n                    {\n                        throw new IllegalArgumentException(\n                            \"image.correlationId=\" + params.responseCorrelationId +\n                                \" did not request a response channel\");\n                    }\n                }\n            }\n\n            throw new IllegalArgumentException(\"image.correlationId=\" + params.responseCorrelationId + \" not found\");\n        }\n\n        private enum State\n        {\n            INIT,\n            PARSE_CHANNEL,\n            VALIDATE,\n            RESOLVE_PUBLICATION,\n            AWAIT_LOG_BUFFER,\n            CREATE_PUBLICATION,\n            DONE","sourceCodeStart":2769,"sourceCodeEnd":2805,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-driver/src/main/java/io/aeron/driver/DriverConductor.java#L2769-L2805","documentation":"A response channel request supplied a response-correlation-id, but no image with that correlation id has send-response-setup enabled, i.e. the referenced image never requested a response channel. The driver throws IllegalArgumentException because the response publication would have nothing valid to respond to.","triggerScenarios":"Setting response-correlation-id to the correlationId of an ordinary image (created without a control-mode=response subscription) when building a response publication; stale/reused correlation ids from a previous connection.","commonSituations":"Implementing Aeron's response-channel RPC pattern with the correlation id captured from the wrong image or an old session; using the publication correlationId instead of the image correlationId; ids cached across reconnects.","solutions":["Use the correlationId from the Image whose hasSendResponseSetup() is true (delivered via the image available handler) as response-correlation-id.","Ensure the originating subscription channel was created with control-mode=response so images carry send-response-setup.","Do not cache response correlation ids across sessions; capture them per connection event.","Verify you are using the image correlationId, not the publication or subscription correlationId."],"exampleFix":"// before\nlong respId = publication.registrationId();\nString uri = \"aeron:udp?control-mode=response|response-correlation-id=\" + respId;\n// after\naeron.addSubscription(subUri, stream, image -> {\n  long respId = image.correlationId(); // image has send-response-setup\n  String uri = \"aeron:udp?control-mode=response|response-correlation-id=\" + respId;\n}, null);","handlingStrategy":"validation","validationCode":"if (!image.hasSendResponseSetup())\n  throw new IllegalStateException(\"image \" + image.correlationId() + \" cannot be used as a response target\");\nlong respId = image.correlationId();","typeGuard":"boolean canRespond(Image image) {\n  return image.hasSendResponseSetup();\n}","tryCatchPattern":"try { aeron.addPublication(responseUri, streamId); }\ncatch (IllegalArgumentException e) { if (e.getMessage().contains(\"did not request a response channel\")) { /* re-fetch correlation id from a send-response-setup image */ } else throw e; }","preventionTips":["Only use image.correlationId() from images with hasSendResponseSetup()","Capture response correlation ids in the image-available handler, never cache across sessions","Ensure the peer subscription was created with control-mode=response","Do not confuse publication/subscription registration ids with the image correlationId"],"tags":["aeron","response-channel","correlation-id","validation"],"backgroundTag":"invalid-argument-value","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-19T12:17:13.211Z"}