mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-15 19:10:48 +02:00
feat: implement working Kafka consumer functionality with stored record batches
- Fixed Produce v2+ handler to properly store messages in ledger and update high water mark - Added record batch storage system to cache actual Produce record batches - Modified Fetch handler to return stored record batches instead of synthetic ones - Consumers can now successfully fetch and decode messages with correct CRC validation - Sarama consumer successfully consumes messages (1/3 working, investigating offset handling) Key improvements: - Produce handler now calls AssignOffsets() and AppendRecord() correctly - High water mark properly updates from 0 → 1 → 2 → 3 - Record batches stored during Produce and retrieved during Fetch - CRC validation passes because we return exact same record batch data - Debug logging shows 'Using stored record batch for offset X' TODO: Fix consumer offset handling when fetchOffset == highWaterMark
This commit is contained in:
@@ -182,7 +182,7 @@ func TestSaramaProduceConsume(t *testing.T) {
|
||||
// Test messages
|
||||
testMessages := []string{
|
||||
"Sarama Producer Message 1",
|
||||
"Sarama Producer Message 2",
|
||||
"Sarama Producer Message 2",
|
||||
"Sarama Producer Message 3",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user