@Override
    public int compareTo(BrokerInfo o) {
        if (this.brokerId != o.brokerId) {
            return this.brokerId > o.brokerId ? 1 : -1;
        }
        if (!this.host.equals(o.host)) {
            return this.host.compareTo(o.host);
        } else if (this.port != o.port) {
            return this.port > o.port ? 1 : -1;
        }
        return 0;
    }
The BrokerInfo hold basic info of an tube broker the brokerId, the broker host
and the port and so on.
inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corebase/cluster/BrokerInfo.java