From 7f9bc31a2308fa1a26488d44cc43c18d9a05108b Mon Sep 17 00:00:00 2001 From: chrislu Date: Fri, 12 Sep 2025 14:47:25 -0700 Subject: [PATCH] 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 --- weed/mq/kafka/protocol/fetch.go | 1 - weed/mq/kafka/protocol/handler.go | 3 --- 2 files changed, 4 deletions(-) diff --git a/weed/mq/kafka/protocol/fetch.go b/weed/mq/kafka/protocol/fetch.go index 40dfd0f1c..e8c639eca 100644 --- a/weed/mq/kafka/protocol/fetch.go +++ b/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 } diff --git a/weed/mq/kafka/protocol/handler.go b/weed/mq/kafka/protocol/handler.go index d43c65756..1626bb50f 100644 --- a/weed/mq/kafka/protocol/handler.go +++ b/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]) 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) @@ -852,7 +851,6 @@ func (h *Handler) HandleMetadataV3V4(correlationID uint32, requestBody []byte) ( } response := buf.Bytes() - fmt.Printf("DEBUG: Metadata v4 response size: %d bytes, hex: %x\n", len(response), response) 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 }