Last Updated: January 6, 2026
Current Focus: Consumer Group Sarama Integration
- Write consumer group integration test using Sarama ConsumerGroup API
- Fix protocol encoding issues discovered during testing
- Get consumer group test to pass ✅ DONE!
| Fix | File | Description |
|---|---|---|
| MetadataResponse v2+ | protocol/metadata_response.go |
Added ClusterID nullable string field |
| JoinGroupResponse | protocol/join_group_response.go |
Fixed ThrottleTime to encode only for v2+ (was v1+) |
| OffsetFetchResponse | protocol/offset_fetch_response.go |
Fixed Offset type from int16 to int64 |
| OffsetFetchResponse v2+ | protocol/offset_fetch_response.go |
Added trailing ErrorCode field |
| HeartbeatResponse v1+ | protocol/heartbeat_response.go |
Added ThrottleTime encoding |
| API Versions | protocol/api_versions.go |
Added OffsetCommitKey and OffsetFetchKey |
| OffsetCommitRequest | protocol/offset_commit_request.go |
Fixed missing Topic field, version-specific fields, range iteration |
| Fix | File | Description |
|---|---|---|
| State Transition | quafka/broker.go |
handleJoinGroup now transitions to CompletingRebalance |
| GroupProtocol | quafka/broker.go |
handleJoinGroup now sets GroupProtocol in response |
| Leader Assignment | quafka/broker.go |
handleSyncGroup now returns leader's assignment (was nil) |
| OffsetFetch Error Response | quafka/broker.go |
Returns all requested partitions with error codes instead of empty |
| Offsets Topic Replicas | quafka/broker.go |
offsetsTopic() now starts replicas via LeaderAndISR |
| Offsets Partitions Config | quafka/config/config.go |
Added OffsetsTopicNumPartitions config option |
- Created
TestConsumerGroupinquafka/server_test.go - Created
TestConsumerGroupOffsetPersistenceto test sequential consumer groups - Reduced
OffsetsTopicReplicationFactorto 1 for single-node tests - Reduced
OffsetsTopicNumPartitionsto 10 for faster test startup - TestConsumerGroup now PASSES ✅
- All integration tests pass ✅
- Kafka client compatibility fixes (MetadataRequest/Response)
- Decoder array length handling for -1 (null arrays)
- BuildIndex bug fix in commitlog
- Package rename from jocko to quafka
- Consumer group PR merge with conflict resolution
- FEATURES.md checklist creation
- CI optimization for faster feedback
Solution:
- Added
OffsetsTopicNumPartitionsconfig option (default 50, tests use 10) - Modified
offsetsTopic()to call LeaderAndISR after creating partitions - Replicas are now started synchronously before FindCoordinator returns
Solution: Modified handleOffsetFetch to return all requested partitions with ErrCoordinatorLoadInProgress or ErrNotCoordinator error codes instead of empty response.
Root Cause: Issues 1 and 2 combined - replicas not ready + empty response = Sarama gave up Resolution: With Issues 1 & 2 fixed, Sarama now successfully transitions to consuming phase.
Solution: Fixed protocol/offset_commit_request.go:
- Added missing Topic string field decode
- Fixed range iteration to use index instead of value copies
- Added proper version-specific field handling (GenerationID, MemberID, RetentionTime, Timestamp)
- Verify offset commits are stored correctly in
__consumer_offsets - Test offset persistence across consumer restarts
Issue: Multi-node test sometimes times out waiting for leader election after failover
Current Fix: Added retry logic around produce and consume operations
Remaining Issue: RetryFunc 7-second timeout may not be enough in some cases
Potential Fixes:
- Increase
RetryFunctimeout for failover scenarios - Add explicit partition leader check before operations
- Improve Raft leader election timing
Consider reducing offsets topic partitions✅ Done - configurable viaOffsetsTopicNumPartitionsOptimize replica creation for faster test startup✅ Done - replicas started inoffsetsTopic()
protocol/metadata_response.go- Metadata APIprotocol/join_group_response.go- JoinGroup APIprotocol/sync_group_response.go- SyncGroup APIprotocol/offset_fetch_response.go- OffsetFetch APIprotocol/heartbeat_response.go- Heartbeat APIprotocol/api_versions.go- Advertised API versions
quafka/broker.go- All request handlers (handleJoinGroup, handleSyncGroup, etc.)quafka/offsets.go- Offset commit/fetch encoding structures
quafka/server_test.go- Integration tests including TestConsumerGroupquafka/consumer_group_test.go- Unit tests for consumer group
# Run consumer group integration test
go test -v -timeout 90s -run TestConsumerGroup ./quafka/
# Run basic produce/consume test (known working)
go test -v -timeout 60s -run TestProduceConsume ./quafka/
# Run all short tests
go test -short ./...
# Run with verbose logging
QUAFKADEBUG=1 go test -v -run TestConsumerGroup ./quafka/- Consumer Group Flow: FindCoordinator → JoinGroup → Metadata → SyncGroup → OffsetFetch → Heartbeat → Fetch ✅ Working!
- Sarama Version: Using V0_10_2_0 which requires consumer group support
- TestConsumerGroup PASSES - Consumer group integration with Sarama is working
- Basic produce/consume with Sarama works - confirms protocol fixes are sound
- QSE-Service compatibility: Protocol changes don't affect commitlog direct usage
- OffsetCommit decoding: ✅ Fixed - OffsetCommit requests now decode and process correctly
FEATURES.md- Feature checklist comparing Quafka vs KafkaCHANGELOG.md- Version history and changesREADME.md- Project overview
This file tracks development progress. Update after each session.