Browse Source

Update offset_management.go

pull/7231/head
chrislu 2 months ago
parent
commit
0437957db5
  1. 5
      weed/mq/kafka/protocol/offset_management.go

5
weed/mq/kafka/protocol/offset_management.go

@ -588,6 +588,11 @@ func (h *Handler) buildOffsetFetchResponse(response OffsetFetchResponse, apiVers
binary.BigEndian.PutUint32(correlationIDBytes, response.CorrelationID) binary.BigEndian.PutUint32(correlationIDBytes, response.CorrelationID)
result = append(result, correlationIDBytes...) result = append(result, correlationIDBytes...)
// Throttle time (4 bytes) - for version 3+ this appears immediately after correlation ID
if apiVersion >= 3 {
result = append(result, 0, 0, 0, 0) // throttle_time_ms = 0
}
// Topics array length (4 bytes) // Topics array length (4 bytes)
topicsLengthBytes := make([]byte, 4) topicsLengthBytes := make([]byte, 4)
binary.BigEndian.PutUint32(topicsLengthBytes, uint32(len(response.Topics))) binary.BigEndian.PutUint32(topicsLengthBytes, uint32(len(response.Topics)))

Loading…
Cancel
Save