AndrewJSchofield commented on code in PR #23651:
URL: https://github.com/apache/kafka/pull/23651#discussion_r4216311799
##########
clients/src/main/java/org/apache/kafka/common/requests/GetTelemetrySubscriptionsRequest.java:
##########
@@ -40,6 +41,11 @@ public Builder(GetTelemetrySubscriptionsRequestData data,
boolean enableUnstable
@Override
public GetTelemetrySubscriptionsRequest build(short version) {
+ // From v1 the client instance ID is carried by the request header
(KIP-1313) and the body
+ // field only exists in v0, so a non-zero value must not reach the
writer.
+ if (version >= 1 &&
!Uuid.ZERO_UUID.equals(data.clientInstanceId())) {
Review Comment:
Ah, I see. When the `ClientTelemetryReporter` builds the requests, it
doesn't know the version being built so it sets the client instance ID
regardless. I wonder whether there's a more elegant way. I'll think about it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]