{"record":{"id":"a295cab4bca4b257","repo":"aeron-io/aeron","slug":"control-mode-response-was-specified-but-no-response","errorCode":null,"errorMessage":"control-mode=response was specified, but no response-correlation-id set","messagePattern":"control-mode=response was specified, but no response-correlation-id set","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"aeron-driver/src/main/java/io/aeron/driver/DriverConductor.java","lineNumber":2768,"sourceCode":"            if (null != responsePublicationImage)\n            {\n                responsePublicationImage.responseSessionId(publication.sessionId());\n                responsePublicationImage.requestNextSmDeadlineReset();\n            }\n\n            state = State.DONE;\n        }\n\n        private PublicationImage findResponsePublicationImage()\n        {\n            if (!params.isResponse)\n            {\n                return null;\n            }\n\n            if (NULL_VALUE == params.responseCorrelationId)\n            {\n                throw new IllegalArgumentException(\n                    \"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                    {","sourceCodeStart":2750,"sourceCodeEnd":2786,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-driver/src/main/java/io/aeron/driver/DriverConductor.java#L2750-L2786","documentation":"A channel URI specified control-mode=response but omitted the mandatory response-correlation-id parameter, which identifies the image/subscription the response publication should correlate with. The driver throws IllegalArgumentException during URI parameter parsing.","triggerScenarios":"Creating a publication/subscription with a URI like \"aeron:udp?control-mode=response\" without \"response-correlation-id=<value>\"; setting control-mode via ChannelUriStringBuilder without calling responseCorrelationId().","commonSituations":"Implementing the response channel (RPC-style) pattern and forgetting the correlation id returned in the Image/connection event; build scripts that only set control-mode; partial porting of C examples to Java.","solutions":["Add response-correlation-id=<correlationId> to the channel URI (value obtained from the requested image's correlation id).","When using ChannelUriStringBuilder, call .responseCorrelationId(id) together with controlMode(Response).","Store the correlation id delivered with the response-setup event before constructing the response channel.","Validate response URIs (control-mode=response implies response-correlation-id present) before passing to the driver."],"exampleFix":"// before\nString uri = \"aeron:udp?endpoint=h:40456|control-mode=response\";\n// after\nString uri = \"aeron:udp?endpoint=h:40456|control-mode=response|response-correlation-id=\" + imageCorrelationId;","handlingStrategy":"validation","validationCode":"ChannelUri uri = ChannelUri.parse(channel);\nif (\"response\".equals(uri.get(\"control-mode\")) && uri.get(\"response-correlation-id\") == null)\n  throw new IllegalArgumentException(\"control-mode=response requires response-correlation-id\");","typeGuard":"boolean responseChannelIsComplete(ChannelUri uri) {\n  return !\"response\".equals(uri.get(\"control-mode\")) || uri.get(\"response-correlation-id\") != null;\n}","tryCatchPattern":"try { aeron.addPublication(uri, streamId); }\ncatch (IllegalArgumentException e) { if (e.getMessage().contains(\"no response-correlation-id\")) { /* append response-correlation-id */ } else throw e; }","preventionTips":["Always pair control-mode=response with response-correlation-id in builders","With ChannelUriStringBuilder call responseCorrelationId() whenever controlMode(Response) is set","Write a unit test asserting complete response channel URIs"],"tags":["aeron","response-channel","missing-parameter","validation"],"backgroundTag":"missing-required-argument","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"}