{"record":{"id":"f056548486fdb4cb","repo":"aeron-io/aeron","slug":"publication-window-length-pubwindow-cannot-be-less-than-the","errorCode":null,"errorMessage":"publication-window-length={pubWindow} cannot be less than the mtu-length={mtuLength}","messagePattern":"publication-window-length=(.+?) cannot be less than the mtu-length=(.+?)","errorType":"validation","errorClass":"InvalidChannelException","httpStatus":null,"severity":"error","filePath":"aeron-driver/src/main/java/io/aeron/driver/PublicationParams.java","lineNumber":177,"sourceCode":"            params.termId = params.initialTermId;\n            params.termOffset = 0;\n        }\n\n        params.isResponse = CONTROL_MODE_RESPONSE.equals(channelUri.get(MDC_CONTROL_MODE_PARAM_NAME));\n        params.responseCorrelationId = parseResponseCorrelationId(channelUri);\n\n        return params;\n    }\n\n    private void getPublicationWindowLength(final ChannelUri channelUri, final MediaDriver.Context ctx)\n    {\n        final String pubWindowParam = channelUri.get(PUBLICATION_WINDOW_LENGTH_PARAM_NAME);\n        if (null != pubWindowParam)\n        {\n            final long pubWindow = SystemUtil.parseSize(PUBLICATION_WINDOW_LENGTH_PARAM_NAME, pubWindowParam);\n            if (pubWindow < mtuLength)\n            {\n                throw new InvalidChannelException(\n                    PUBLICATION_WINDOW_LENGTH_PARAM_NAME + \"=\" + pubWindow + \" cannot be less than the \" +\n                    MTU_LENGTH_PARAM_NAME + \"=\" + mtuLength);\n            }\n\n            if (pubWindow > (termLength >> 1))\n            {\n                throw new InvalidChannelException(\n                    PUBLICATION_WINDOW_LENGTH_PARAM_NAME + \"=\" + pubWindow + \" must not exceed half the \" +\n                    TERM_LENGTH_PARAM_NAME + \"=\" + termLength);\n            }\n            publicationWindowLength = (int)pubWindow;\n        }\n        else\n        {\n            publicationWindowLength = Configuration.producerWindowLength(\n                termLength,\n                channelUri.isIpc() ? ctx.ipcPublicationTermWindowLength() : ctx.publicationTermWindowLength());\n        }","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-driver/src/main/java/io/aeron/driver/PublicationParams.java#L159-L195","documentation":"The publication-window-length URI parameter controls how far ahead a publication may send; it must be at least the MTU length or no single maximum-sized message could ever fit in the window. Values below mtu-length are rejected with InvalidChannelException.","triggerScenarios":"A channel URI with publication-window-length smaller than the effective mtu-length (e.g. publication-window-length=1k with mtu-length=8192, or a raised mtu-length that overtakes a fixed window).","commonSituations":"Tuning MTU up (e.g. for jumbo frames) while keeping a small window from an older config; copy-pasted URI params tuned for a different network; setting window in KB but MTU left at default after edits.","solutions":["Raise publication-window-length to >= mtu-length","Lower mtu-length to be <= the desired window","Remove publication-window-length and use the context default"],"exampleFix":"// before\n\"aeron:udp?endpoint=...:40456|mtu-length=16384|publication-window-length=8k\"\n// after\n\"aeron:udp?endpoint=...:40456|mtu-length=16384|publication-window-length=16k\"","handlingStrategy":"validation","validationCode":"if (publicationWindowLength < mtuLength) throw new IllegalArgumentException(\"window must be >= mtu-length\");","typeGuard":null,"tryCatchPattern":"try { pub = aeron.addPublication(uri, streamId); } catch (InvalidChannelException e) { log.error(\"window vs mtu conflict: {}\", e.getMessage()); }","preventionTips":["Validate window >= mtu whenever changing mtu-length","Keep window/mtu pairs in one config block","Re-check channel URIs after tuning MTU for jumbo frames"],"tags":["aeron","uri","configuration"],"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"}