{"record":{"id":"6ed1c90e2909008a","repo":"aeron-io/aeron","slug":"aeron-client-instance-must-set-aeron-context","errorCode":null,"errorMessage":"Aeron client instance must set Aeron.Context.useConductorInvoker(true)","messagePattern":"Aeron client instance must set Aeron\\.Context\\.useConductorInvoker\\(true\\)","errorType":"exception","errorClass":"ArchiveException","httpStatus":null,"severity":"error","filePath":"aeron-archive/src/main/java/io/aeron/archive/Archive.java","lineNumber":1366,"sourceCode":"                        .useConductorAgentInvoker(true)\n                        .subscriberErrorHandler(RethrowingErrorHandler.INSTANCE)\n                        .awaitingIdleStrategy(YieldingIdleStrategy.INSTANCE)\n                        .clientLock(NoOpLock.INSTANCE)\n                        .clientName(clientName));\n\n                if (null == errorCounter)\n                {\n                    if (NULL_VALUE !=\n                        ArchiveCounters.find(aeron.countersReader(), ARCHIVE_ERROR_COUNT_TYPE_ID, archiveId))\n                    {\n                        throw new ArchiveException(\"found existing archive for archiveId=\" + archiveId);\n                    }\n                    errorCounter = ArchiveCounters.allocateErrorCounter(aeron, tempBuffer, archiveId);\n                }\n            }\n            else if (!aeron.context().useConductorAgentInvoker())\n            {\n                throw new ArchiveException(\n                    \"Aeron client instance must set Aeron.Context.useConductorInvoker(true)\");\n            }\n\n            if (!(aeron.context().subscriberErrorHandler() instanceof RethrowingErrorHandler))\n            {\n                throw new ArchiveException(\"Aeron client must use a RethrowingErrorHandler\");\n            }\n\n            Objects.requireNonNull(errorCounter, \"Error counter must be supplied if aeron client is\");\n\n            if (null == countedErrorHandler)\n            {\n                countedErrorHandler = new CountedErrorHandler(errorHandler, errorCounter);\n            }\n\n            if (null == threadFactory)\n            {\n                threadFactory = Thread::new;","sourceCodeStart":1348,"sourceCodeEnd":1384,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-archive/src/main/java/io/aeron/archive/Archive.java#L1348-L1384","documentation":"Archive requires its Aeron client to be created with Context.useConductorInvoker(true) so the archive's conductor agent can drive the client's conductor work without a separate thread. If the supplied Aeron client was built with the default (dedicated conductor thread) mode, Archive throws ArchiveException during startup. This is a deliberate configuration invariant, not a transient failure.","triggerScenarios":"Passing an Aeron instance whose Aeon.Context has useConductorInvoker(false) (the default) to Archive.launch() or the Archive constructor with a pre-built client.","commonSituations":"Embedding Archive in an application that already created its Aeron client for normal pub/sub use and reuses it for the archive media driver; copying older sample code from before the invoker requirement was enforced.","solutions":["Set useConductorInvoker(true) on the Aeron.Context used to create the client passed to Archive.","If the client must be shared with non-archive code, create a dedicated Aeron client for the archive with the invoker enabled.","Upgrade-related check: review migration notes if an older Aeron version did not require this setting."],"exampleFix":"// before\nAeron aeron = Aeron.connect(new Aeron.Context());\nArchive.launch(ctx.aeron(aeron));\n// after\nAeron aeron = Aeron.connect(new Aeron.Context().useConductorInvoker(true));\nArchive.launch(ctx.aeron(aeron));","handlingStrategy":"validation","validationCode":"if (!aeron.context().useConductorAgentInvoker())\n{\n    throw new IllegalArgumentException(\"Aeron client for Archive must use conductor agent invoker\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Centralize Aeron client construction in a factory that always sets useConductorInvoker(true) for archive clients","Validate Aeron.Context settings before passing a client to Archive.launch()"],"tags":["aeron","archive","configuration"],"backgroundTag":"invalid-config-value","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"}