{"record":{"id":"c261bbc9ca3c3de6","repo":"aeron-io/aeron","slug":"option-conflicts-with-existing-subscription-isresponse","errorCode":null,"errorMessage":"option conflicts with existing subscription: isResponse=${isResponse} existingChannel=${existingChannel} channel=${channel}","messagePattern":"option conflicts with existing subscription: isResponse=(.+?) existingChannel=(.+?) channel=(.+?)","errorType":"exception","errorClass":"InvalidChannelException","httpStatus":null,"severity":"error","filePath":"aeron-driver/src/main/java/io/aeron/driver/DriverConductor.java","lineNumber":1638,"sourceCode":"                    if (params.isReliable != subscription.isReliable())\n                    {\n                        throw new InvalidChannelException(\n                            \"option conflicts with existing subscription: reliable=\" + params.isReliable +\n                                \" existingChannel=\" + subscription.channel() + \" channel=\" +\n                                udpChannel.originalUriString());\n                    }\n\n                    if (params.isRejoin != subscription.isRejoin())\n                    {\n                        throw new InvalidChannelException(\n                            \"option conflicts with existing subscription: rejoin=\" + params.isRejoin +\n                                \" existingChannel=\" + subscription.channel() + \" channel=\" +\n                                udpChannel.originalUriString());\n                    }\n\n                    if (params.isResponse != subscription.isResponse())\n                    {\n                        throw new InvalidChannelException(\n                            \"option conflicts with existing subscription: isResponse=\" + params.isResponse +\n                                \" existingChannel=\" + subscription.channel() + \" channel=\" +\n                                udpChannel.originalUriString());\n                    }\n                }\n            }\n        }\n    }\n\n    private void linkMatchingImages(final SubscriptionLink subscriptionLink)\n    {\n        for (int i = 0, size = publicationImages.size(); i < size; i++)\n        {\n            final PublicationImage image = publicationImages.get(i);\n            if (subscriptionLink.matches(image) && image.isAcceptingSubscriptions())\n            {\n                final long registrationId = subscriptionLink.registrationId();\n                final long joinPosition = image.joinPosition();","sourceCodeStart":1620,"sourceCodeEnd":1656,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-driver/src/main/java/io/aeron/driver/DriverConductor.java#L1620-L1656","documentation":"The 'response' option on Aeron subscriptions must be consistent across all subscriptions matching the same channel endpoint and streamId. This InvalidChannelException is thrown when a new subscription matches an existing one but sets isResponse to a different value.","triggerScenarios":"Adding a subscription with response=true (response channels) on a channel/streamId where a subscription with response=false (or default) already exists and matches tag/endpoint/stream, e.g. mixing \"aeron:udp?endpoint=h:p|response=true\" with a plain subscription.","commonSituations":"Enabling the response-channel feature on one subscriber while legacy subscribers on the same stream omit it; component adds a response subscription to a shared stream; copy-pasted URIs where one gained the response param.","solutions":["Set the same response value on all subscriptions for that channel/streamId","Close the conflicting existing subscription before re-adding with the new option","Use a separate streamId or channel endpoint for response subscriptions","Keep a single URI builder so option parity is guaranteed"],"exampleFix":"// before\naeron.addSubscription(\"aeron:udp?endpoint=localhost:40456\", 1001); // existing, response=false\n// after\naeron.addSubscription(\"aeron:udp?endpoint=localhost:40456|response=true\", 1001); // now consistent","handlingStrategy":"try-catch","validationCode":"boolean response = channel.contains(\"response=true\");\n// ensure consistency with all other subscriptions on this channel/streamId","typeGuard":null,"tryCatchPattern":"try { aeron.addSubscription(channel, streamId, handler, unavailableHandler); } catch (InvalidChannelException e) { if (e.getMessage().contains(\"isResponse=\")) { log.error(\"response option mismatch: {}\", e.getMessage()); } throw e; }","preventionTips":["Apply the response= flag uniformly to all subscribers of a stream","Only enable response=true on streams dedicated to the response-channel feature","Do not mix legacy plain URIs with response-enabled URIs on the same stream","Keep URIs generated from one config source"],"tags":["aeron","subscription","channel-config","conflict"],"backgroundTag":"conflicting-config-options","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"}