{"record":{"id":"df9c37af013fe796","repo":"apache/seatunnel","slug":"tables-configs-d-start-mode-timestamp-and-st","errorCode":null,"errorMessage":"tables_configs[%d]: 'start_mode.timestamp' and 'start_mode.offsets' require an appropriate start_mode","messagePattern":"tables_configs\\[(.+?)\\]: 'start_mode\\.timestamp' and 'start_mode\\.offsets' require an appropriate start_mode","errorType":"validation","errorClass":"OptionValidationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceFactory.java","lineNumber":244,"sourceCode":"                } else if (startMode == StartMode.SPECIFIC_OFFSETS) {\n                    Map<String, Long> offsets =\n                            entryConfig.get(KafkaSourceOptions.START_MODE_OFFSETS);\n                    if (offsets == null || offsets.isEmpty()) {\n                        throw new OptionValidationException(\n                                \"tables_configs[%d]: 'start_mode.offsets' must not be empty \"\n                                        + \"when start_mode=SPECIFIC_OFFSETS\",\n                                i);\n                    }\n                    if (entries.get(i).containsKey(KafkaSourceOptions.START_MODE_TIMESTAMP.key())) {\n                        throw new OptionValidationException(\n                                \"tables_configs[%d]: 'start_mode.timestamp' is only valid \"\n                                        + \"when start_mode=TIMESTAMP\",\n                                i);\n                    }\n                } else if (entries.get(i).containsKey(KafkaSourceOptions.START_MODE_TIMESTAMP.key())\n                        || entries.get(i)\n                                .containsKey(KafkaSourceOptions.START_MODE_OFFSETS.key())) {\n                    throw new OptionValidationException(\n                            \"tables_configs[%d]: 'start_mode.timestamp' and \"\n                                    + \"'start_mode.offsets' require an appropriate start_mode\",\n                            i);\n                }\n            }\n            return true;\n        }\n    }\n}\n","sourceCodeStart":226,"sourceCodeEnd":254,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceFactory.java#L226-L254","documentation":"KafkaSourceFactory validates tables_configs before creating a source. If an entry sets 'start_mode.timestamp' or 'start_mode.offsets' without also setting start_mode to TIMESTAMP or SPECIFIC_OFFSETS respectively, the options are meaningless and validation fails. This prevents silently ignoring start-position settings.","triggerScenarios":"Calling KafkaSourceFactory.evaluate with a tables_configs entry containing start_mode.timestamp or start_mode.offsets while start_mode is unset, set to EARLIEST/LATEST/GROUP_OFFSETS, or set to a value incompatible with the given option.","commonSituations":"Users copy a config snippet with start_mode.timestamp from an example but forget start_mode=TIMESTAMP; or they set start_mode.offsets while leaving the default start_mode; config typos like start_mode=timestamp (wrong case).","solutions":["Add start_mode=TIMESTAMP when using start_mode.timestamp","Add start_mode=SPECIFIC_OFFSETS when using start_mode.offsets","Remove the timestamp/offsets keys if you did not intend a custom start position"],"exampleFix":"// before\ntables_configs = [{topic = \"t\", start_mode.timestamp = 1700000000000}]\n// after\ntables_configs = [{topic = \"t\", start_mode = TIMESTAMP, start_mode.timestamp = 1700000000000}]","handlingStrategy":"validation","validationCode":"// Java: pre-validate a tables_configs entry before submit\nboolean hasTs = entry.containsKey(\"start_mode.timestamp\");\nboolean hasOffsets = entry.containsKey(\"start_mode.offsets\");\nString mode = (String) entry.get(\"start_mode\");\nif (hasTs && !\"TIMESTAMP\".equals(mode))\n    throw new IllegalArgumentException(\"start_mode.timestamp requires start_mode=TIMESTAMP\");\nif (hasOffsets && !\"SPECIFIC_OFFSETS\".equals(mode))\n    throw new IllegalArgumentException(\"start_mode.offsets requires start_mode=SPECIFIC_OFFSETS\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pair start_mode.timestamp with start_mode=TIMESTAMP","Always pair start_mode.offsets with start_mode=SPECIFIC_OFFSETS","Validate the HOCON config locally with -e local before cluster submission"],"tags":["kafka","config-validation","seatunnel"],"backgroundTag":"conflicting-config-options","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}