private ClientMaster.HeartRequestP2M createHeartbeatRequest() throws Exception {
        ClientMaster.HeartRequestP2M.Builder builder =
                ClientMaster.HeartRequestP2M.newBuilder();
        builder.setClientId(producerId);
        builder.addAllTopicList(publishTopics.keySet());
        builder.setBrokerCheckSum(this.brokerInfoCheckSum);
        if ((System.currentTimeMillis() - this.lastBrokerUpdatedTime) > BROKER_UPDATED_TIME_AFTER_RETRY_FAIL) {
            builder.setBrokerCheckSum(-1L);
            this.lastBrokerUpdatedTime = System.currentTimeMillis();
        }
        builder.setHostName(AddressUtils.getLocalAddress());
        ClientMaster.MasterCertificateInfo.Builder authInfoBuilder = genMasterCertificateInfo(false);
        if (authInfoBuilder != null) {
            builder.setAuthInfo(authInfoBuilder.build());
        }
        builder.setAppdConfig(buildAllowedConfig4P());
        return builder.build();
    }
Get partitions of the given topic.

@param topic topic name
@return partition map
inlong-tubemq/tubemq-client/src/main/java/org/apache/inlong/tubemq/client/producer/ProducerManager.java