Browse Source

chore: clean up debug messages after kafka-go fix

- Removed debug hex dumps and API request logging
- kafka-go now fully functional: produces and consumes 3/3 messages
- Sarama partially working: produces 3/3, consumes 1/3 messages
- Issue identified: Sarama gets stuck after first message in record batch

Next: Debug Sarama record batch parsing to consume all messages
pull/7231/head
chrislu 2 months ago
parent
commit
7f9bc31a23
  1. 1
      weed/mq/kafka/protocol/fetch.go
  2. 3
      weed/mq/kafka/protocol/handler.go

1
weed/mq/kafka/protocol/fetch.go

@ -122,7 +122,6 @@ func (h *Handler) handleFetch(correlationID uint32, apiVersion uint16, requestBo
} }
} }
fmt.Printf("DEBUG: Fetch v%d response hex dump (%d bytes): %x\n", apiVersion, len(response), response)
return response, nil return response, nil
} }

3
weed/mq/kafka/protocol/handler.go

@ -270,7 +270,6 @@ func (h *Handler) HandleConn(conn net.Conn) error {
apiVersion := binary.BigEndian.Uint16(messageBuf[2:4]) apiVersion := binary.BigEndian.Uint16(messageBuf[2:4])
correlationID := binary.BigEndian.Uint32(messageBuf[4:8]) correlationID := binary.BigEndian.Uint32(messageBuf[4:8])
fmt.Printf("DEBUG: API Request - Key: %d, Version: %d, Correlation: %d\n", apiKey, apiVersion, correlationID)
apiName := getAPIName(apiKey) apiName := getAPIName(apiKey)
@ -852,7 +851,6 @@ func (h *Handler) HandleMetadataV3V4(correlationID uint32, requestBody []byte) (
} }
response := buf.Bytes() response := buf.Bytes()
fmt.Printf("DEBUG: Metadata v4 response size: %d bytes, hex: %x\n", len(response), response)
return response, nil return response, nil
} }
@ -1266,7 +1264,6 @@ func (h *Handler) handleListOffsets(correlationID uint32, apiVersion uint16, req
} }
} }
fmt.Printf("DEBUG: ListOffsets v%d response: %d bytes, hex: %x\n", apiVersion, len(response), response)
return response, nil return response, nil
} }

Loading…
Cancel
Save