grepplabs / kafka-proxy

Proxy connections to Kafka cluster. Connect through SOCKS Proxy, HTTP Proxy or to cluster running in Kubernetes.
Apache License 2.0
488 stars 83 forks source link

"Metadata" request (ApiKey=3 and ApiVersion=5) in the Kafka Proxy is not following the protocol structure defined by Kafka protocol guide #154

Closed haribabupuppala closed 10 months ago

haribabupuppala commented 10 months ago

I am trying to read the "Metadata" request in proxy\common.go file under the method myCopyN() function in the for loop as show below if requestKeyVersion.ApiKey == 3 && requestKeyVersion.ApiVersion == 5 { logrus.Printf("Metadata request: %s", string(buf[0:n]) ) } I am getting the following result, which is not following the request structure as defined in the Kafka protocol guide.

Metadata request: ) clientId topicName is this a bug in Kafka Proxy ? or something wrong the way I am reading? please help.

Also I see there is no "STRUCT" defined for the "MetaData" request in Kafka Proxy source code, does this mean the "MetaData" request does not follow any structure?, then how to read the "MetaData" request? , please help

haribabupuppala commented 10 months ago

Closing this comment as I able to figure out myself the issue with reading metadata request