{"record":{"id":"1fe9dca8e31ccea9","repo":"aeron-io/aeron","slug":"unknown-thread-naming-mode-mode","errorCode":null,"errorMessage":"Unknown thread naming mode: <mode>","messagePattern":"Unknown thread naming mode: <mode>","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"aeron-client/src/main/java/io/aeron/CommonContext.java","lineNumber":564,"sourceCode":"     */\n    public static final String THREAD_NAMING_DEFAULT = THREAD_NAMING_CLASSIC;\n\n\n    /**\n     * Choose a thread/role name depending on the configured naming scheme.\n     *\n     * @param newName the new, prefixed name.\n     * @param classicName  the old name.\n     * @return the name to use for the current naming scheme.\n     */\n    public static String threadName(final String newName, final String classicName)\n    {\n        final String mode = System.getProperty(THREAD_NAMING_PROP_NAME, THREAD_NAMING_DEFAULT);\n        return switch (mode)\n        {\n            case THREAD_NAMING_CLASSIC -> classicName;\n            case THREAD_NAMING_NEW -> newName;\n            default -> throw new IllegalArgumentException(\"Unknown thread naming mode: \" + mode);\n        };\n    }\n\n    /**\n     * Event Buffer length system property name. If not set then output will default to {@link System#out}.\n     */\n    public static final String EVENT_LOG_FILENAME_PROP_NAME = \"aeron.event.log.filename\";\n    /**\n     * Event Buffer log file max length system property. If not set then {@link Long#MAX_VALUE} will be used.\n     */\n    public static final String EVENT_LOG_FILE_MAX_LENGTH = \"aeron.event.log.file.max.length\";\n\n    /**\n     * System property to toggle whether {@link BinaryRenderer} implementations render the remaining bytes\n     * of fields that are not part of the header information.\n     */\n    public static final String EVENT_LOG_RENDER_DATA_PROP_NAME = \"aeron.event.log.render.data\";\n","sourceCodeStart":546,"sourceCodeEnd":582,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-client/src/main/java/io/aeron/CommonContext.java#L546-L582","documentation":"Aeron names its internal threads according to the aeron.thread.name.mode system property ('classic' or 'new'). An unknown value for this property causes threadName to throw an IllegalArgumentException.","triggerScenarios":"Setting -Daeron.thread.name.mode to any string other than CLASSIC or NEW (e.g. a typo like 'Classic' or 'legacy') before creating an Aeron client or driver.","commonSituations":"Typo in JVM system property or environment config; copying a property value from documentation of a different library; case-sensitive value mismatch.","solutions":["Set -Daeron.thread.name.mode to exactly \"classic\" or \"new\" (see CommonContext.THREAD_NAMING_CLASSIC / THREAD_NAMING_NEW)","Remove the aeron.thread.name.mode property to fall back to the default","Check for stray whitespace or case differences in the property value"],"exampleFix":"// before\n-Daeron.thread.name.mode=New\n\n// after\n-Daeron.thread.name.mode=new","handlingStrategy":"validation","validationCode":"String mode = System.getProperty(\"aeron.thread.name.mode\", \"\");\nif (!mode.isEmpty() && !mode.equals(\"classic\") && !mode.equals(\"new\")) {\n    throw new IllegalArgumentException(\"aeron.thread.name.mode must be 'classic' or 'new', got: \" + mode);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the constants CommonContext.THREAD_NAMING_CLASSIC / THREAD_NAMING_NEW when setting the property","Centralise Aeron system-property setup in one validated config class","Prefer Aeron.Context configuration over raw system properties where possible"],"tags":["aeron","configuration","system-property","threads"],"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-19T12:17:13.211Z"}