diff --git a/generate/definitions/03_metadata b/generate/definitions/03_metadata index 9397761e..12518601 100644 --- a/generate/definitions/03_metadata +++ b/generate/definitions/03_metadata @@ -1,5 +1,5 @@ // MetadataRequest requests metadata from Kafka. -MetadataRequest => key 3, max version 11, flexible v9+ +MetadataRequest => key 3, max version 12, flexible v9+ // Topics is a list of topics to return metadata about. If this is null // in v1+, all topics are included. If this is empty, no topics are. // For v0 ( // There can be a myriad of other errors for unsuccessful topic creation. ErrorCode: int16 // Topic is the topic this metadata corresponds to. - Topic: string + Topic: nullable-string // The topic ID. TopicID: uuid // v10+ // IsInternal signifies whether this topic is a Kafka internal topic. diff --git a/pkg/kmsg/generated.go b/pkg/kmsg/generated.go index f8b5a070..d1ef54ac 100644 --- a/pkg/kmsg/generated.go +++ b/pkg/kmsg/generated.go @@ -5189,7 +5189,7 @@ type MetadataRequest struct { } func (*MetadataRequest) Key() int16 { return 3 } -func (*MetadataRequest) MaxVersion() int16 { return 11 } +func (*MetadataRequest) MaxVersion() int16 { return 12 } func (v *MetadataRequest) SetVersion(version int16) { v.Version = version } func (v *MetadataRequest) GetVersion() int16 { return v.Version } func (v *MetadataRequest) IsFlexible() bool { return v.Version >= 9 } @@ -5484,7 +5484,7 @@ type MetadataResponseTopic struct { ErrorCode int16 // Topic is the topic this metadata corresponds to. - Topic string + Topic *string // The topic ID. TopicID [16]byte // v10+ @@ -5563,7 +5563,7 @@ type MetadataResponse struct { } func (*MetadataResponse) Key() int16 { return 3 } -func (*MetadataResponse) MaxVersion() int16 { return 11 } +func (*MetadataResponse) MaxVersion() int16 { return 12 } func (v *MetadataResponse) SetVersion(version int16) { v.Version = version } func (v *MetadataResponse) GetVersion() int16 { return v.Version } func (v *MetadataResponse) IsFlexible() bool { return v.Version >= 9 } @@ -5646,9 +5646,9 @@ func (v *MetadataResponse) AppendTo(dst []byte) []byte { { v := v.Topic if isFlexible { - dst = kbin.AppendCompactString(dst, v) + dst = kbin.AppendCompactNullableString(dst, v) } else { - dst = kbin.AppendString(dst, v) + dst = kbin.AppendNullableString(dst, v) } } if version >= 10 { @@ -5848,11 +5848,11 @@ func (v *MetadataResponse) ReadFrom(src []byte) error { s.ErrorCode = v } { - var v string + var v *string if isFlexible { - v = b.CompactString() + v = b.CompactNullableString() } else { - v = b.String() + v = b.NullableString() } s.Topic = v } diff --git a/pkg/kversion/kversion.go b/pkg/kversion/kversion.go index ee4de385..a51d9973 100644 --- a/pkg/kversion/kversion.go +++ b/pkg/kversion/kversion.go @@ -868,8 +868,8 @@ var maxTip = nextMax(max280, func(v listenerKeys) listenerKeys { // KAFKA-10580 2b8aff58b575c199ee8372e5689420c9d77357a5 KIP-516 v[1].inc() // 13 fetch + // KAFKA-10744 1d22b0d70686aef5689b775ea2ea7610a37f3e8c KIP-516 + v[3].inc() // 12 metadata + return v }) - -// NOTE when adding to this, be sure to update any raw usages of requests in -// kgo (because we do not go through NewXyzRequest() to set fields).