{"record":{"id":"e13832772515bf48","repo":"t8y2/dbx","slug":"unsupported-reset-position-s","errorCode":null,"errorMessage":"unsupported reset position: %s","messagePattern":"unsupported reset position: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/rocketmq/consumers.go","lineNumber":252,"sourceCode":"\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\t\treturn okResult(), nil\n\t}\n\tposition := strings.ToLower(stringValue(params, \"position\"))\n\tif position == \"\" {\n\t\tposition = \"latest\"\n\t}\n\tvar timestamp int64\n\tswitch position {\n\tcase \"earliest\":\n\t\ttimestamp = 0\n\tcase \"latest\":\n\t\ttimestamp = time.Now().UnixMilli()\n\tcase \"timestamp\":\n\t\ttimestamp = int64Value(params, time.Now().UnixMilli(), \"timestampMs\")\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported reset position: %s\", position)\n\t}\n\tif _, err := client.ResetOffsetByTimestamp(ctx, topic, groupID, timestamp, true); err != nil {\n\t\treturn nil, err\n\t}\n\treturn okResult(), nil\n}\n\nfunc (a *rocketMQAgent) getConsumerLag(params map[string]any) (any, error) {\n\tgroupID, err := requireString(params, \"groupId\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttopic, err := requireString(params, \"topic\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclient, config, _ := a.requireClient()\n\tctx, cancel := context.WithTimeout(context.Background(), config.RequestTimeout)","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/rocketmq/consumers.go#L234-L270","documentation":"Returned by resetConsumerGroupOffsets in the rocketmq driver when the 'position' parameter is not one of earliest, latest, or timestamp (case-insensitive; defaults to latest when empty). Any other value reaches the switch default and is rejected before the reset RPC is issued.","triggerScenarios":"Dispatching a reset-offsets action with a 'position' param such as 'beginning', 'oldest', 'END', or an empty string.","commonSituations":"Porting Kafka tooling vocabulary ('beginning'/'end') to RocketMQ; case-sensitivity mistakes ('Latest'); leaving position unset when a helper defaults it to something invalid.","solutions":["Use exactly 'earliest', 'latest', or 'timestamp' for position","For arbitrary points, set position to 'timestamp' and supply 'timestampMs'","Normalize/trim and lowercase the position value in your tooling before dispatch"],"exampleFix":"// before\n{\"groupId\": \"g1\", \"topic\": \"t1\", \"position\": \"beginning\"}\n// after\n{\"groupId\": \"g1\", \"topic\": \"t1\", \"position\": \"timestamp\", \"timestampMs\": 1720000000000}","handlingStrategy":"validation","validationCode":"valid := map[string]bool{\"earliest\": true, \"latest\": true, \"timestamp\": true}\nif !valid[position] {\n    return fmt.Errorf(\"position must be earliest|latest|timestamp, got %q\", position)\n}\nif position == \"timestamp\" && timestampMs <= 0 {\n    return errors.New(\"timestampMs required when position=timestamp\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only the documented literals: earliest, latest, timestamp","Map Kafka terms in wrappers (beginning->earliest, end->latest)","Lowercase/trim user input before dispatch"],"tags":["validation","offset-reset","consumer-group"],"backgroundTag":"invalid-enum-value","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}