File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -409,8 +409,8 @@ export class Base<OptionsType extends BaseOptions = BaseOptions> extends EventEm
409409
410410 // This should never change, but we act defensively here
411411 for ( const broker of metadata . brokers ) {
412- const { host, port } = broker
413- brokers . set ( broker . nodeId , { host, port } )
412+ const { host, port, rack } = broker
413+ brokers . set ( broker . nodeId , { host, port, rack } )
414414 }
415415
416416 this . #metadata. brokers = brokers
@@ -428,7 +428,9 @@ export class Base<OptionsType extends BaseOptions = BaseOptions> extends EventEm
428428 partitions [ rawPartition . partitionIndex ] = {
429429 leader : rawPartition . leaderId ,
430430 leaderEpoch : rawPartition . leaderEpoch ,
431- replicas : rawPartition . replicaNodes
431+ replicas : rawPartition . replicaNodes ,
432+ isr : rawPartition . isrNodes ,
433+ offlineReplicas : rawPartition . offlineReplicas
432434 }
433435 }
434436
Original file line number Diff line number Diff line change 11import { type Broker , type ConnectionOptions } from '../../network/connection.ts'
2+ import { type NullableString } from '../../protocol/definitions.ts'
23import { type Metrics } from '../metrics.ts'
34
45export interface TopicWithPartitionAndOffset {
@@ -11,6 +12,8 @@ export interface ClusterPartitionMetadata {
1112 leader : number
1213 leaderEpoch : number
1314 replicas : number [ ]
15+ isr : number [ ]
16+ offlineReplicas : number [ ]
1417}
1518
1619export interface ClusterTopicMetadata {
@@ -22,7 +25,7 @@ export interface ClusterTopicMetadata {
2225
2326export interface ClusterMetadata {
2427 id : string
25- brokers : Map < number , Broker >
28+ brokers : Map < number , Broker & { rack : NullableString } >
2629 topics : Map < string , ClusterTopicMetadata >
2730 lastUpdate : number
2831}
You can’t perform that action at this time.
0 commit comments