public BrokerRegistration build() {
            return new BrokerRegistration(
                id,
                epoch,
                incarnationId,
                listeners,
                supportedFeatures,
                rack,
                fenced,
                inControlledShutdown,
                isMigratingZkBroker,
                directories);
        }
An immutable class which represents broker registrations.
metadata/src/main/java/org/apache/kafka/metadata/BrokerRegistration.java