Files
seaweedfs/weed
chrislu b3865007a4 mq(kafka): Add comprehensive API version validation system
✅ MAJOR ARCHITECTURE IMPROVEMENT - Version Validation System

🎯 FEATURES ADDED:
- Complete API version validation for all 13 supported APIs
- Version-aware request routing with proper error responses
- Structured version mapping with min/max supported versions
- Graceful handling of unsupported API versions with UNSUPPORTED_VERSION error

🛠️ IMPLEMENTATION:
- validateAPIVersion(): Checks requested version against supported ranges
- buildUnsupportedVersionResponse(): Returns proper Kafka error (code 35)
- Version-aware handlers for Metadata (v0) and Produce (v0/v1)
- Removed conflicting duplicate handleMetadata method

📊 VERSION SUPPORT MATRIX:
- ApiVersions: v0-v3 ✅
- Metadata: v0 only (foundational)
- Produce: v0-v1 ✅
- Fetch: v0-v1 ✅
- CreateTopics: v0-v4 ✅
- All other APIs: ranges defined for future implementation

🔍 EVIDENCE OF SUCCESS:
- 'DEBUG: Handling Produce v1 request' (version routing works)
- 'WriteMessages succeeded!' (kafka-go compatibility maintained)
- No UNSUPPORTED_VERSION errors in logs
- Clean error handling for invalid versions

IMPACT:
This establishes a robust foundation for protocol compatibility.
Different Kafka clients can now negotiate appropriate API versions,
and our gateway gracefully handles version mismatches instead of crashing.

Next: Implement additional versions of key APIs (Metadata v1+, Produce v2+).
2025-09-10 16:13:35 -07:00
..
2025-08-09 21:47:29 -07:00
2025-07-19 23:56:17 -07:00
2025-08-30 11:15:48 -07:00
2025-08-31 23:31:28 -07:00
2025-08-22 01:15:42 -07:00
2025-09-10 11:04:42 -07:00
2025-08-30 11:15:48 -07:00
2024-06-25 09:18:11 -07:00
2025-08-30 11:15:48 -07:00
2024-02-14 08:26:38 -08:00
2025-07-19 21:43:34 -07:00
2025-03-17 23:13:27 -07:00