private MessageSentResult buildMsgSentResult(final long dltTime,
            final Message message,
            final Partition partition,
            final ClientBroker.SendMessageResponseB2P response) {
        final String resultStr = response.getErrMsg();
        if (response.getErrCode() == TErrCodeConstants.SUCCESS) {
            producerManager.getClientMetrics().bookSuccSendMsg(dltTime,
                    message.getTopic(), partition.getPartitionKey(), message.getData().length);
            if (response.hasMessageId()) {
                return new MessageSentResult(true,
                        response.getErrCode(), "Ok!",
                        message, response.getMessageId(), partition,
                        response.getAppendTime(), response.getAppendOffset());
            } else {
                return new MessageSentResult(true, response.getErrCode(), "Ok!",
                        message, Long.parseLong(resultStr), partition);
            }
        } else {
            producerManager.getClientMetrics().bookFailRpcCall(response.getErrCode());
            return new MessageSentResult(false, response.getErrCode(), resultStr,
                    message, TBaseConstants.META_VALUE_UNDEFINED, partition);
        }
    }
Check if the given topic accept publish message.

@param topic topic name
@return if accept message
@throws TubeClientException
inlong-tubemq/tubemq-client/src/main/java/org/apache/inlong/tubemq/client/producer/SimpleMessageProducer.java